X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-CGI-Ex;a=blobdiff_plain;f=lib%2FCGI%2FEx.pm;fp=lib%2FCGI%2FEx.pm;h=09e5139d26ac82b9fdd7b868506ed31ff7980a03;hp=bc44ab4ca563d088bcfae39e092417a7a4d53b1b;hb=febed4ec71f803b083c3e61b82b9464e9bfb0992;hpb=ed00221d27dfab1e82ec2ea040ab4c399a91c545 diff --git a/lib/CGI/Ex.pm b/lib/CGI/Ex.pm index bc44ab4..09e5139 100644 --- a/lib/CGI/Ex.pm +++ b/lib/CGI/Ex.pm @@ -24,7 +24,7 @@ use vars qw($VERSION use base qw(Exporter); BEGIN { - $VERSION = '2.24'; + $VERSION = '2.27'; $PREFERRED_CGI_MODULE ||= 'CGI'; @EXPORT = (); @EXPORT_OK = qw(get_form @@ -417,7 +417,7 @@ sub time_calc { return time + ($m->{lc($3)} || 1) * "$1$2"; } else { my @stat = stat $time; - die "Could not find file \"$time\" for time_calc" if $#stat == -1; + die "Could not find file \"$time\" for time_calc. You should pass one of \"now\", time(), \"[+-] \\d+ [smhdwMy]\" or a filename." if $#stat == -1; return $stat[9]; } } @@ -486,7 +486,7 @@ sub print_js { ### get file info my $stat; - if ($js_file && $js_file =~ m|^/+?(\w+(?:/+\w+)*\.js)$|i) { + if ($js_file && $js_file =~ m|^/*(\w+(?:/+\w+)*\.js)$|i) { foreach my $path (@INC) { my $_file = "$path/$1"; next if ! -f $_file;