Subject: | XML-XSLT 0.48 examples/agenda warnings |
Running the included examples/agenda project w/ the included xslt-parser throw out the errors/warnings:
Use of uninitialized value in concatenation (.) or string at
/usr/local/lib/perl5/site_perl/5.8.0/XML/XSLT.pm line 3212.
The problem is sub __evaluate_test__ is matching against undef vars as:
if ($test =~ /^\s*(\S+?)\s*(<=|>=|!=|<|>|=)\s*['"]?([^'"]*?)['"]?\s*$/)
{
$lhs = $1;
$test_cond = $2;
$expval = $3;
}
$self->debug("Test LHS: $lhs");
the match against $test fails. Added an else (standard diff):
3208c3208,3211
< }
---
Show quoted text
> } else {
> $self->debug("no match for test");
> return "";
> }
Which is what happens anyways, after 2 failed matches against the undefined $lhs a one if/elsif/else later.
a