Subject: | missing argument in push |
use'ing the module XML::LibXML::Iterator triggers a warning with perl -w:
Useless use of push with no values at [.../]XML/LibXML/Iterator.pm line 20.
There seems to be an argument missing for 'push' in that line.
The follwing two-liner triggers the warning:
Show quoted text
>>>
#!/usr/bin/perl -w
use XML::LibXML::Iterator;
<<<
There is a patch attached that adds $_ as a second argument. I guess this is what is missing.
Observed on:
XML::LibXML::Iterator 1.00
XML::LibXML 1.58
libxml2 2.6.7-28.4
perl 5.8.3
Linux oldfield 2.6.5-7.111.5-default #1 Wed Nov 17 11:08:17 UTC 2004 i686 i686 i386 GNU/Linux (Suse 9.1)
Thanks for your time,
Tylman
diff -Naur XML-LibXML-Iterator-1.00-orig/lib/XML/LibXML/Iterator.pm XML-LibXML-Iterator-1.00/lib/XML/LibXML/Iterator.pm
--- XML-LibXML-Iterator-1.00-orig/lib/XML/LibXML/Iterator.pm 2002-11-08 18:18:36.000000000 +0100
+++ XML-LibXML-Iterator-1.00/lib/XML/LibXML/Iterator.pm 2004-12-21 14:55:24.252760640 +0100
@@ -17,7 +17,7 @@
if ( wantarray ) {
my @rv = ();
while ( $_[0]->next ){
- push @rv;
+ push @rv, $_;
}
return @rv;
} else {