--- Michael Stevens <[EMAIL PROTECTED]> wrote: > #!/home/mstevens/tools/perl-5.8.8/bin/perl > > use Module::CPANTS::Analyse; > use Data::Dumper; > > print "Analysing: " . $ARGV[0] . "\n"; > > open FH, ">/tmp/out" || die; > print FH "1\n"; > my $analyser = Module::CPANTS::Analyse->new ( > { > dist => $ARGV[0] > } > ); > print FH "2\n"; > print FH $a->unpack;
You're not using strict and warnings. If you had, you might have seen that $analyzer was used only once. However, $a would not have thrown an error on compile because $a is a special variable used in sorting. However, you probably would have gotten an error about not being able to call a method on an undefined variable. The docs suggest what you're doing is OK, but it appears that there's a typo on the docs. From the analyze.t test in the test suite: my $a=Module::CPANTS::Analyse->new({ dist=>'t/eg/Acme-DonMartin-0.06.tar.gz', _dont_cleanup=>$ENV{DONT_CLEANUP}, }); my $rv=$a->unpack; Switching $analyze to $a should work. However, it's not recommend to use the special $a and $b variables in this way since they're for sorting. Converting all of your $a variables to $analyze and using strict and warnings should help. Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/