Author: stas Date: Wed May 25 12:04:14 2005 New Revision: 178513 URL: http://svn.apache.org/viewcvs?rev=178513&view=rev Log: fix ModPerl::TestReport used by t/REPORT and mp2bug to use ExtUtils::MakeMaker's MM->parse_version to get the interesting packages version number, w/o trying to load them (which may fail if the environment is not right)
Modified: perl/modperl/trunk/Changes perl/modperl/trunk/lib/ModPerl/TestReport.pm Modified: perl/modperl/trunk/Changes URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/Changes?rev=178513&r1=178512&r2=178513&view=diff ============================================================================== --- perl/modperl/trunk/Changes (original) +++ perl/modperl/trunk/Changes Wed May 25 12:04:14 2005 @@ -12,6 +12,11 @@ =item 2.0.1-dev +fix ModPerl::TestReport used by t/REPORT and mp2bug to use +ExtUtils::MakeMaker's MM->parse_version to get the interesting +packages version number, w/o trying to load them (which may fail if +the environment is not right) [Stas] + fix a bug in ModPerl::RegistryCooker: now stripping __(END|DATA)__ only at the beginning of the line [Stas] Modified: perl/modperl/trunk/lib/ModPerl/TestReport.pm URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/lib/ModPerl/TestReport.pm?rev=178513&r1=178512&r2=178513&view=diff ============================================================================== --- perl/modperl/trunk/lib/ModPerl/TestReport.pm (original) +++ perl/modperl/trunk/lib/ModPerl/TestReport.pm Wed May 25 12:04:14 2005 @@ -19,6 +19,8 @@ use base qw(Apache::TestReportPerl); +use ExtUtils::MakeMaker (); + my @interesting_packages = qw( CGI ExtUtils::MakeMaker @@ -52,11 +54,7 @@ for my $dir (@inc) { my $path = "$dir/$filename"; if (-e $path) { - no warnings 'redefine'; - my $ver = eval { require $path; - delete $INC{$path}; - $package->VERSION; - }; + my $ver = MM->parse_version($path); # two versions could be installed (one under Apache2/) push @{ $packages{$package} }, $ver if $ver; }