1 # Copyright 2005-2007 Interchange Development Group and others
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version. See the LICENSE file for details.
8 # $Id: relative_filename.oc,v 1.3 2007-03-30 23:40:48 pajamian Exp $
10 CodeDef relative_filename OrderCheck 1
11 CodeDef relative_filename Description Relative filename
12 CodeDef relative_filename Routine <<EOR
14 my ($ref, $name, $value, $code) = @_;
16 if ($value =~ /\S/ && $value !~ /^\.{1,2}$/
17 && ! Vend::File::absolute_or_relative($value)) {
18 return (1, $name, '');
20 $code ||= errmsg('filename not relative');
21 return (0, $name, $code);