Skip Menu |

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

Report information
The Basics
Id: 48482
Status: resolved
Priority: 0/
Queue: Module-New

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

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



Subject: Problems in the Module::Install generator
A few things you should change in the Module::Install constructor. 1. You don't need use strict/warnings, M:I does it automatically. 2. You should have a specific version of M:I, either the latest or what is on the person's host. 3. Those should be test_requires, not build_requires (for forward compatibility) 4. Don't add the dependency on UseAllModules. Auto-generated author-only tests like these should not be listed as dependencies in META.yml and only run if the test modules are actually installed. 5. auto_install() is strongly discouraged except in some minor cases like Catalyst applications. The actual recommended template for the class should be something like... file 'Makefile.PL' => content { return <<'EOT'; use inc::Module::Install 0.91; name '<%= $c->distname %>'; all_from '<%= $c->mainfile %>'; test_requires 'Test::More' => '0.47'; WriteAll; EOT };
Sorry I didn't do anything for this for years. As a record, M::I constructor is dropped in 0.08, and this is not an issue anymore. Thanks for the report. On Thu Aug 06 15:35:09 2009, ADAMK wrote: Show quoted text
> A few things you should change in the Module::Install constructor. > > 1. You don't need use strict/warnings, M:I does it automatically. > > 2. You should have a specific version of M:I, either the latest or what > is on the person's host. > > 3. Those should be test_requires, not build_requires (for forward > compatibility) > > 4. Don't add the dependency on UseAllModules. Auto-generated author-only > tests like these should not be listed as dependencies in META.yml and > only run if the test modules are actually installed. > > 5. auto_install() is strongly discouraged except in some minor cases > like Catalyst applications. > > The actual recommended template for the class should be something like... > > file 'Makefile.PL' => content { return <<'EOT'; > use inc::Module::Install 0.91; > > name '<%= $c->distname %>'; > all_from '<%= $c->mainfile %>'; > test_requires 'Test::More' => '0.47'; > > WriteAll; > EOT > };