Name

relative_filename — value qualifies as relative filename

DESCRIPTION

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

relative_filename is available in Interchange versions:

4.6.0-5.7.0 (git-head)

SOURCE

Interchange 5.7.0:

Source: code/OrderCheck/relative_filename.oc
Lines: 24


# Copyright 2005-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: relative_filename.oc,v 1.3 2007-03-30 23:40:48 pajamian Exp $

CodeDef relative_filename OrderCheck 1
CodeDef relative_filename Description Relative filename
CodeDef relative_filename Routine <<EOR
sub {
my ($ref, $name, $value, $code) = @_;

if ($value =~ /\S/ && $value !~ /^\.{1,2}$/ 
  && ! Vend::File::absolute_or_relative($value)) {
  return (1, $name, '');
} else {
  $code ||= errmsg('filename not relative');
  return (0, $name, $code);
}
}
EOR

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!