Skip Menu |

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

Maintainer(s)' notes

Attention bug reporters: issues MUST include the version of Module::Metadata that you are running that exhibit the stated symptoms. thank you!

Report information
The Basics
Id: 113641
Status: open
Priority: 0/
Queue: Module-Metadata

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.000000
Fixed in: (no value)



Subject: package_versions_from_directory barfs if new_from_file() fails

Line 267:

      my $pm_info = $class->new_from_file( $file );

      foreach my $package ( $pm_info->packages_inside ) {

....

 perl -d:Confess -MModule::Metadata -e 'Module::Metadata->package_versions_from_directory(q[/var/empty],[q[/tmp/idonotexist] ])'
Can't call method "packages_inside" on an undefined value at /home/kent/perl5/perlbrew/perls/5.22.1-nossp-sdbm-nopmc/lib/site_perl/5.22.1/Module/Metadata.pm line 269.
    Module::Metadata::package_versions_from_directory("Module::Metadata", "/var/empty", ARRAY(0x24a84c0)) called at -e line 1


 

: [ether@jaeger git/Module-Metadata]$; git checkout v1.000027 Note: checking out 'v1.000027'. ... : [ether@jaeger git/Module-Metadata]$; perl -Ilib -d:Confess -MModule::Metadata -e 'Module::Metadata->package_versions_from_directory(q[/var/empty],[q[/tmp/idonotexist] ])' Can't call method "packages_inside" on an undefined value at lib/Module/Metadata.pm line 264. Module::Metadata::package_versions_from_directory("Module::Metadata", "/var/empty", ARRAY(0x7f8c4c004668)) called at -e line 1 I'm relieved to see this is not a regression in the current trial series, so I am adjusting the 'broken in' field accordingly. And it is also observed way back in 1.0.0: : [ether@jaeger git/Module-Metadata]$; git checkout release_1.0.0 Previous HEAD position was 9d50689... Changes file and 1.000001 version bump for release HEAD is now at 2e941ad... bump Module::Metadata version to 1.0.0 : [ether@jaeger git/Module-Metadata]$; : [ether@jaeger git/Module-Metadata]$; perl -Ilib -d:Confess -MModule::Metadata -e 'Module::Metadata->package_versions_from_directory(q[/var/empty],[q[/tmp/idonotexist] ])' Can't call method "packages_inside" on an undefined value at lib/Module/Metadata.pm line 178. Module::Metadata::package_versions_from_directory("Module::Metadata", "/var/empty", ARRAY(0x7f9d13004668)) called at -e line 1