Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: nadim [...] khemir.net
Cc:
AdminCc:

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



Subject: Module::Build Won't build a distribution
[nadim@nadim Text-Editor-Vip]$ ./Build dist Deleting META.yml Couldn't load YAML.pm, generating a minimal META.yml without it. Please check and edit the generated metadata, or consider installing YAML.pm. Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/site_perl/5.8.6/Module/Build/Base.pm line 2227. [nadim@nadim Text-Editor-Vip]$ sudo cpan Module::Build CPAN: Storable loaded ok Going to read /home/nadim/.cpan/Metadata Database was generated on Tue, 18 Oct 2005 10:00:52 GMT Module::Build is up to date. [nadim@nadim Text-Editor-Vip]$ sudo cpan YAML CPAN: Storable loaded ok Going to read /home/nadim/.cpan/Metadata Database was generated on Tue, 18 Oct 2005 10:00:52 GMT YAML is up to date. I use M::B for another module and building a distribution for that module give: [nadim@nadim PerlBuildSystem]$ ./Build dist Deleting META.yml Couldn't load YAML.pm, generating a minimal META.yml without it. Please check and edit the generated metadata, or consider installing YAML.pm. Use of uninitialized value in join or string at /usr/lib/perl5/site_perl/5.8.6/Module/Build/Base.pm line 2227. Creating PerlBuildSystem-0.36.tar.gz tar cf PerlBuildSystem-0.36.tar PerlBuildSystem-0.36 gzip PerlBuildSystem-0.36.tar gzip: PerlBuildSystem-0.36.tar.gz already exists; do you wish to overwrite (y or n)? y Deleting PerlBuildSystem-0.36 Nadim.
I think the problem it's having in the first case is related to 'dist_author'. It looks like it can't determine the author of your distribution. Normally that information is extracted from the POD of your module(s). If that's right, then the following patch should fix it - could you try it? Index: lib/Module/Build/Base.pm ========================================================= ========== diff -u -r1.340.2.33 Base.pm --- lib/Module/Build/Base.pm 28 Aug 2005 15:04:44 -0000 1.340.2.33 +++ lib/Module/Build/Base.pm 22 Oct 2005 21:00:39 -0000 @@ -2229,7 +2229,7 @@ name: $p->{dist_name} version: $p->{dist_version} author: -@{[ join "\n", map " - $_", @{$self->dist_author} ]} +@{[ join "\n", map " - $_", @{$self->dist_author || []} ]} abstract: @{[ $self->dist_abstract ]} license: $p->{license} generated_by: Module::Build version $Module::Build::VERSION, without YAML.pm ========== -Ken [NKH - Sat Oct 22 14:41:33 2005]: Show quoted text
> [nadim@nadim Text-Editor-Vip]$ ./Build dist > Deleting META.yml > > Couldn't load YAML.pm, generating a minimal META.yml without it. > Please check and edit the generated metadata, or consider installing > YAML.pm. > > Can't use an undefined value as an ARRAY reference at > /usr/lib/perl5/site_perl/5.8.6/Module/Build/Base.pm line 2227. > > [nadim@nadim Text-Editor-Vip]$ sudo cpan Module::Build > CPAN: Storable loaded ok > Going to read /home/nadim/.cpan/Metadata > Database was generated on Tue, 18 Oct 2005 10:00:52 GMT > Module::Build is up to date. > > [nadim@nadim Text-Editor-Vip]$ sudo cpan YAML > CPAN: Storable loaded ok > Going to read /home/nadim/.cpan/Metadata > Database was generated on Tue, 18 Oct 2005 10:00:52 GMT > YAML is up to date. > > > I use M::B for another module and building a distribution for that > module give: > > [nadim@nadim PerlBuildSystem]$ ./Build dist > Deleting META.yml > > Couldn't load YAML.pm, generating a minimal META.yml without it. > Please check and edit the generated metadata, or consider installing > YAML.pm. > > Use of uninitialized value in join or string at > /usr/lib/perl5/site_perl/5.8.6/Module/Build/Base.pm line 2227. > Creating PerlBuildSystem-0.36.tar.gz > tar cf PerlBuildSystem-0.36.tar PerlBuildSystem-0.36 > gzip PerlBuildSystem-0.36.tar > gzip: PerlBuildSystem-0.36.tar.gz already exists; do you wish to > overwrite (y or n)? y > Deleting PerlBuildSystem-0.36 > > Nadim.
On Oct 22, 2005, at 5:58 PM, nadim@khemir.net via RT wrote: Show quoted text
> > I tried and it works fine. So I can now release the module :)
Cool, I'll make sure that patch is part of the next bugfix release in the 0.26xx series (assuming there is one - 0.28xx might beat it to the punch). Show quoted text
> Where should that information be in the pod so I make it work properly? >
It should be in an "AUTHOR" section, like so: =head1 AUTHOR Nadim Ibn Hamouda El Khemir, nadim@khemir.net Show quoted text
> > The module for which I could build the distribution, bfore your patch, still > displays the same error.
Yeah, for that distribution it's missing some other piece of information besides the author, but I'm not sure what. What piece of information looks like it's missing from the META.yml file? Show quoted text
> > Both modules 'dist' still complain abount being unable to load YAML.pm. > > perl -MYAML -e ... is fine
This is a behavior we've fixed in 0.27_xx - it used to "freeze" the decision about whether to use YAML according to whether YAML was present when you *installed* Module::Build. Now it will sense whether YAML became present after Module::Build was installed. To fix it in your case, you can run the following command: config_data --module Module::Build --set_feature YAML_support=1 assuming you let the config_data script be installed when you installed Module::Build. If you didn't, you could just hand-edit the Module::Build::ConfigData file. -Ken