Greetings,
I thought I'd take a look at
CPAN-Forum. I downloaded the module/package, inspected, then installed the dependencies, and finally built, tested, and installed it.
Everything went as expected. However, I seem to be having troubles with hosting it in a
sub-directory within the web site's document root "/".
While it
does attempt to
set the (it's) DOCROOT (ROOT) when it initializes, it doesn't appear to
stick.
Anyway, The following error might have something to do with it:
Use of uninitialized value $ENV{"PATH_INFO"} in pattern match (m//) at
+ Forum.pm line 674
The line in question (with fuller context):
if (not $rm or $rm eq "home") {
if ($ENV{PATH_INFO} =~m{^/ # Line 674
([^/]+) # first word till after the first /
(?:/(.*))? # the rest, after the (optional) second /
}x) {
my $newrm = $1;
my $params = $2 || "";
if (grep {$newrm eq $_} @urls) {
my @params = split /\//, $params;
$self->param(path_parameters => @params ? \@params : []);
$rm = $newrm;
$self->prerun_mode($rm);
} elsif ($ENV{PATH_INFO} eq "/cgi/index.pl") {
# TODO this is temporary to avoid unnecessary warnings
} else {
warn "Invalid PATH_INFO: $ENV{PATH_INFO}";
# shall I make more noise ?
}
}
}
While I could imagine picking an unlikely to be used name, and declare/assign it to
($ENV{PATH_INFO}...)
It seems that that environment variable should already exist -- I haven't had trouble(s) in the past with it.
Any helpful suggestions, greatly appreciated.
Thank you for all your time, and consideration.
--chris
#!/usr/bin/perl -Tw
use perl::always;
my $perl_version = "5.12.5";
print $perl_version;
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.