CGI-Scriptpaths
view release on metacpan or search on metacpan
lib/CGI/Scriptpaths.pm view on Meta::CPAN
}
debug('cant get rel path with docroot and abs path set');
}
my $rel = _script_rel_path_last_resort();
$rel=~s/^\/+//;
return "/$rel";
}
sub _script_rel_path_last_resort {
# my @caller = caller(1);
#@caller
# debug("caller @caller \n");
my $rel = $ENV{SCRIPT_NAME};
$rel ||= $0;
defined $rel or return;
if ($rel=~/^\// ){
# then we cant determine it, because it's absolute
debug("path starts with slash [$rel], must be absolute, we cannot determine rel path");
}
( run in 0.733 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )