the error message refers to
$param being undefined...
it looks like the parameter name is not defined and (in my version of CGI.pm at least) this looks like a problem...
# from CGI.pm
sub parse_params {
my($self,$tosplit) = @_;
my(@pairs) = split(/[&;]/,$tosplit);
my($param,$value);
foreach (@pairs) {
($param,$value) = split('=',$_,2);
$value = '' unless defined $value;
$param = unescape($param);
# this is where the situation goes unchecked...
# CGI::Util::unescape returns undef if $param is undef
# none the wiser and no error checking!
$value = unescape($value);
$self->add_parameter($param);
push (@{$self->{$param}},$value);
}
}
so my guess is that you have a URL like:
http://your.site.here/cgi-bin/script.pl?param1=value1&=value2¶m3=v
+alue3
which is lacking "param2" and would cause the issue you are seeing. try adding...
next unless defined $param;
where I put the 3 line comment inside the parse_params sub
hope this helps
update: if this does turn out to be the problem you may want to check if the most recent version has the same problem - if so you can email the author(s) and let him/her/them know you have discovered a bug
larryk
perl -le "s,,reverse killer,e,y,rifle,lycra,,print"
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.