Skip Menu |

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

Report information
The Basics
Id: 85524
Status: resolved
Priority: 0/
Queue: Module-Build

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

Bug Information
Severity: Normal
Broken in: 0.4005
Fixed in: (no value)



Subject: Cannot read abstract automatically from modules with underscores in their names.
Hi all, thanks for Module::Build. If a component of a module's filename contains underscore, then the abstract cannot be read from it automatically. To reproduce: <<<< shlomif@telaviv1:~/TEMP$ hg clone https://bitbucket.org/shlomif/abc-pathwarning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting) warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting) destination directory: abc-path requesting all changes adding changesets adding manifests adding file changes added 342 changesets with 664 changes to 85 files (+1 heads) updating to branch default 83 files updated, 0 files merged, 0 files removed, 0 files unresolved shlomif@telaviv1:~/TEMP$ cd abc-path/ shlomif@telaviv1:~/TEMP/abc-path$ hg checkout module_build_underscore_bug 1 files updated, 0 files merged, 0 files removed, 0 files unresolved shlomif@telaviv1:~/TEMP/abc-path$ ls abc-path shlomif@telaviv1:~/TEMP/abc-path$ cd abc-path/Gam Games-ABC_Path-Generator/ Games-ABC_Path-Solver/ shlomif@telaviv1:~/TEMP/abc-path$ cd abc-path/Games-ABC_Path-Generator/ shlomif@telaviv1:~/TEMP/abc-path/abc-path/Games-ABC_Path-Generator$ perl Build.PL WARNING: the following files are missing in your kit: Makefile.PL META.json META.yml Please inform the author. ERROR: Missing required field 'dist_abstract' for metafile Could not get valid metadata. Error is: Invalid metadata structure. Errors: Missing mandatory field, 'abstract' (abstract) [Validation: 1.4], value is an undefined string (abstract) [Validation: 1.4] at /home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.16.3/Module/Build/Base.pm line 4581. Could not create MYMETA files Creating new 'Build' script for 'Games-ABC_Path-Generator' version 'v0.1.1' shlomif@telaviv1:~/TEMP/abc-path/abc-path/Games-ABC_Path-Generator$ Show quoted text
>>>
The attached tentative patch fixes the problem without a test. Regards, -- Shlomi Fish
Subject: git.diff
diff --git a/lib/Module/Build/PodParser.pm b/lib/Module/Build/PodParser.pm index ab4f467..cbd5f3b 100644 --- a/lib/Module/Build/PodParser.pm +++ b/lib/Module/Build/PodParser.pm @@ -29,7 +29,7 @@ sub parse_from_filehandle { while (<$fh>) { next unless /^=(?!cut)/ .. /^=cut/; # in POD # Accept Name - abstract or C<Name> - abstract - last if ($self->{abstract}) = /^ (?: [a-z0-9:]+ | [BCIF] < [a-z0-9:]+ > ) \s+ - \s+ (.*\S) /ix; + last if ($self->{abstract}) = /^ (?: [a-z_0-9:]+ | [BCIF] < [a-z_0-9:]+ > ) \s+ - \s+ (.*\S) /ix; } my @author;
Thanks. I merged the pull request over on GitHub.