Skip Menu |

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

Report information
The Basics
Id: 1857
Status: resolved
Priority: 0/
Queue: Module-Info

People
Owner: Nobody in particular
Requestors: mbarbon [...] dsi.unive.it
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.12
Fixed in: (no value)



Subject: [PATCH] Module::Info on ActivePerl
More cut'n'paste from Deparse... fixes failing tests for me. With 5.8.0/Win32/ithreads fails just one test (line 89), because 'C:\Programmi\Devel\Perl5.8.0-mingw\lib' ne 'c:\Programmi\Devel\Perl5.8.0-mingw\lib'. Regards Mattia
Only in Module-Info-0.12.mod: Makefile Only in Module-Info-0.12.mod: blib diff -r -u -2 Module-Info-0.12/lib/B/Module/Info.pm Module-Info-0.12.mod/lib/B/Module/Info.pm --- Module-Info-0.12/lib/B/Module/Info.pm Sun Feb 03 02:40:49 2002 +++ Module-Info-0.12.mod/lib/B/Module/Info.pm Mon Sep 09 13:58:10 2002 @@ -73,13 +73,21 @@ } - walkoptree_filtered(B::main_root, - \&is_require, - \&show_require, - ); + { + local $CurCV = B::main_cv; + walkoptree_filtered(B::main_root, + \&is_require, + \&show_require, + ); + } }, subs_called => sub { my %roots = filtered_roots; - foreach my $op (B::main_root, values %roots) { - walkoptree_filtered($op, + my @roots = ( [ B::main_root, B::main_cv ], + map { [ $roots{$_}, + B::svref_2object(\&{$_}) ] } + keys %roots ); + foreach my $o (@roots) { + local $CurCV = $o->[1]; + walkoptree_filtered($o->[0], \&sub_call, \&sub_check ); @@ -196,9 +204,8 @@ } - my $sv = $kid->sv; + my $sv = const_sv($kid); $name = $sv->isa("B::PV") ? $sv->PV : - $sv->isa("B::NV") ? $sv->NV + $sv->isa("B::NV") ? $sv->NV : $sv->IV; - } else { @@ -252,6 +259,7 @@ my($name_op) = grep($_->name eq 'gv', @kids); if( $name_op ) { + my $gv = gv_or_padgv($name_op); printf "function call to %s at %s line %d\n", - $name_op->gv->NAME, $B::Utils::file, $B::Utils::line; + $gv->NAME, $B::Utils::file, $B::Utils::line; } else { @@ -262,4 +270,13 @@ } +sub gv_or_padgv { +# my $self = shift; + my $op = shift; + if ($op->isa("B::PADOP")) { + return padval($op->padix); + } else { # class($op) eq "SVOP" + return $op->gv; + } +} sub _class_or_object_method { @@ -269,5 +286,5 @@ my($classop) = $kids[1]; if( $classop->name eq 'const' ) { - $class = $classop->sv->PV; + $class = const_sv($classop)->PV; } Only in Module-Info-0.12.mod/lib/B/Module: Info.pm~ Only in Module-Info-0.12.mod: pm_to_blib diff -r -u -2 Module-Info-0.12/t/Module-Info.t Module-Info-0.12.mod/t/Module-Info.t --- Module-Info-0.12/t/Module-Info.t Sun Feb 03 02:49:05 2002 +++ Module-Info-0.12.mod/t/Module-Info.t Mon Sep 09 14:02:13 2002 @@ -87,5 +87,5 @@ # dunno what the version will be, 5.004's had none. -ok( grep($mod_info->inc_dir eq $_, @core_inc), ' inc_dir()' ); +ok( grep($mod_info->inc_dir eq $_, @core_incW), ' inc_dir()' ); is( $mod_info->file, File::Spec->catfile( $mod_info->inc_dir, 'Text', 'Soundex.pm' ), Only in Module-Info-0.12.mod/t: Module-Info.t~ Only in Module-Info-0.12.mod/t/lib: Foo.pm~