Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 20609
Status: resolved
Priority: 0/
Queue: Module-Starter

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

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



Subject: Annoyances with META.yml
I'm using Module::Starter with Module::Starter::PBP with some satisfaction. There's only one thing that is not satisfactory IMHO, i.e. the META.yml file management. Module::Starter includes this file into the MANIFEST auto-generated file, but never generates even an empty META.yml file. In my system this results in the following: * a warning when calling perl Makefile.PL * an error when issuing make dist All these annoyances disappear by only creating an empty META.yml file. I attach a simple "session" to show the warning, the error and the simple solution; note that the auto-generated META.yml file seems good. Now, I know that this is probably a problem with ExtUtils::MakeMaker (given that Module::Build only shows the warning and not the error), but could it be possible to either generate an empty META.yml file, or to exclude META.yml from the MANIFEST file? Best regards, Flavio.
Subject: report.Module-Build
Download report.Module-Build
application/octet-stream 2.4k

Message body not shown because it is not plain text.

Subject: report.ExtUtils-MakeMaker
Download report.ExtUtils-MakeMaker
application/octet-stream 3.3k

Message body not shown because it is not plain text.

From: sjn+perlbug [...] pvv.org
On Fre. 21. Jul. 2006 12:24:26, POLETTIX wrote: Show quoted text
> I'm using Module::Starter with Module::Starter::PBP with some > satisfaction. There's only one thing that is not satisfactory IMHO, i.e. > the META.yml file management.
I've noticed the same, and have a solution! Let Module::Starter create a stub META.yml, perhaps only containing a comment about the purpose of the file: =======================8<---------------------- # This is a stub META.yml file which will be automatically replaced # the next time "make dist" (EU::MM), "./Build dist" (M::B) or it's # related commands is run. # # To explicitly create a META.yml file, run "./Build distmeta" or # "make distmeta", depending on which build environment you're using. # # This file was generated by Module::Starter::Simple 1.43 ----------------->8============================
Subject: Re: [rt.cpan.org #20609] Annoyances with META.yml
Date: Mon, 4 Sep 2006 14:55:52 +0200 (CEST)
To: bug-Module-Starter [...] rt.cpan.org
From: "Flavio Poletti" <flavio [...] polettix.it>
[snip] Show quoted text
> Let Module::Starter create a stub META.yml, perhaps only containing a > comment about the purpose of the file: > > =======================8<---------------------- > # This is a stub META.yml file which will be automatically replaced
[snip] I tried to put a META.yml file together with the other files in the $HOME/.module-starter/PBP directory, but with no luck (i.e. the file doesn't get copied). I suspect that this file is explicitly filtered out. Am I missing something?
From: sjn+perlbug [...] pvv.org
On Man. 04. Sep. 2006 08:54:27, flavio@polettix.it wrote: Show quoted text
> [snip]
> > Let Module::Starter create a stub META.yml, perhaps only containing a > > comment about the purpose of the file: > > > > =======================8<---------------------- > > # This is a stub META.yml file which will be automatically replaced
> [snip] > > I tried to put a META.yml file together with the other files in the > $HOME/.module-starter/PBP directory, but with no luck (i.e. the file > doesn't get copied). I suspect that this file is explicitly filtered out. > > Am I missing something? >
Ah, I apologize. My comment was more directed at the Module::Starter author than at you. To fix this issue, the Module::Starter::create_distro has to be redone, as AFAICT, there's no easy and obvious manner one can add a META.yml file to the distro creation. You're in fact been bitten by the bad design of the module, just as I did. There is an evil hack one can do to work around this issue. You can make your own class to override the create_MANIFEST() method, and in it call your own file creation methods before calling the original create_MANIFEST() method. (Just make sure your own module is listed last in the list of plugins Module::Starter is supposed to use). Your module might look like this: ===========================8<---------------------- package My::Plugin; sub create_MANIFEST { my $self = shift; my @files = @_; push(@files, $self->create_META_yml() ); $self->SUPER::create_MANIFEST(@files); } sub create_META_yml { my $self = shift; my $fname = File::Spec->catfile( $self->{basedir}, "META.yml" ); open( my $fh, ">", $fname ) or die "Can't create $fname: $!\n"; print $fh $self->MANIFEST_SKIP_guts(); close $fh; $self->progress( "Created $fname" ); return "META.yml"; } sub META_yml_guts { my $self = shift; my %options; my $template = $self->{templates}{"META.yml"}; $self->render($template, \%options); } 1; ------------------------->8================================ This workaround will of course break the moment one of the Module::Starter authors actually fixes the bad design. Sorry I can't help you any more than this. :-(
The solution here is simple: Remove META.yml from the MANIFEST. MakeMaker will generate META.yml for you and put it into the MANIFEST as part of making the dist. It has always done this, there's no need to "help" it along. --- lib/Module/Starter/Simple.pm (revision 25220) +++ lib/Module/Starter/Simple.pm (local) @@ -116,7 +116,6 @@ push @files, $self->create_Changes; push @files, $self->create_README( $build_instructions ); push @files, "MANIFEST"; - push @files, 'META.yml # Will be created by "make dist"'; $self->create_MANIFEST( @files ); }
This has already been done at some point in the past.