Skip Menu |

This queue is for tickets about the Module-ScanDeps CPAN distribution.

Report information
The Basics
Id: 1893
Status: resolved
Worked: 20 min
Priority: 0/
Queue: Module-ScanDeps

People
Owner: Nobody in particular
Requestors: crazyinsomniac [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.10
Fixed in: (no value)



Subject: calculate_info is broken (Bad index while coercing array into hash at C:/Perl/site/lib/Module/ScanDeps.pm line 474.)
# This example taken adapted from your POD # you don't test this intefrace in your test # YOU SHOULD TEST EVERYTHING use Module::ScanDeps; my $scan = Module::ScanDeps->new; $scan->set_file( $INC{'Module/ScanDeps.pm'} ); $scan->set_options( add_modules => [ 'Test::More' ] ); $scan->calculate_info; my $files = $scan->get_files; use Data::Dumper; die Dumper $files; __END__ Bad index while coercing array into hash at C:/Perl/site/lib/Module/ScanDeps.pm line 474.
Date: Fri, 27 Dec 2002 10:35:00 +0800
From: Autrijus Tang <autrijus [...] autrijus.org>
To: via RT <bug-Module-ScanDeps [...] rt.cpan.org>
Cc: "AdminCc of cpan Ticket #1893": ;
Subject: Re: [cpan #1893] calculate_info is broken (Bad index while coercing array into hash at C:/Perl/site/lib/Module/ScanDeps.pm line 474.)
RT-Send-Cc:
On Thu, Dec 26, 2002 at 11:54:38AM -0500, via RT wrote: Show quoted text
> # This example taken adapted from your POD > # you don't test this intefrace in your test > # YOU SHOULD TEST EVERYTHING
Strangely, *itworksforme*, both for 0.10 and the blead version. Can you try http://aut.dyndns.org/dist/Module-ScanDeps-0.11-tobe.tar.gz and provide me with more detail about what and where is broken? Thanks, /Autrijus/
Download (untitled)
application/pgp-signature 187b

Message body not shown because it is not plain text.

From: crazyinsomniac [...] yahoo.com
[autrijus@autrijus.org - Thu Dec 26 21:34:11 2002]: Same error. This is perl5.6. Works fine on perl5.8.
From: crazyinsomniac [...] yahoo.com
after doing some debugging (against my better judgment) by making line 496 use Data::Dumper; warn $type.' '.Dumper($info->{$type}); i get something like this right before the error modules $VAR1 = [ { 'store_as' => 'Carp.pm', 'file' => 'C:/Perl/lib/Carp.pm', 'used_by' => [ { 'store_as' => 'Data/Dumper.pm', 'file' => 'C:/Perl/lib/Data/Dumper.pm', 'used_by' => [ { 'store_as' => 'ScanDeps.pm', 'file' => 'E:/new/Module-ScanDeps- 0.11/blib/lib/Module/ScanDeps.pm' } ] } ] }, { 'and so on and so forth' } ]; I then thought, hmm, maybe i'll take a look at splain (should have done this earlier) and splain says Bad index while coercing array into hash (#1) (F) The index looked up in the hash found as the 0'th element of a pseudo-hash is not legal. Index values must be at 1 or greater. See perlref. So then I thought, ah, I see, evil incarnate, oh boy ;) I hope you can resolve this, and possibly without using pseudohashes (they're just evil, evil evil evil evil evil evil EXPERIMENTAL evil)
Thanks, fixed and added tests in 0.14. You may also wish to check out 0.14's scandeps.pl tool. :-)