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: 12417
Status: resolved
Worked: 2 min
Priority: 0/
Queue: Module-Starter

People
Owner: rjbs [...] cpan.org
Requestors: offer.kaye [...] gmail.com
Cc:
AdminCc:

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



Subject: "--version" prints an error message
Hi, When running "module-starter --version", I get "Use of uninitialized value in concatenation (.) or string at module-starter line 59." I'm running Module::Starter version 1.38 . Line 59 is: version => sub { print "module-starter v$Module::Starter::VERSION\n"; exit 1; }, The problem seems to be that Module::Starter is not "used" anywhere, nor is it "required" before this line. so $Module::Starter::VERSION ends up being an empty string. I would have sent a patch, but I am confused about what version to print - always that of Module::Starter, or the selected backend? If the selected backend, I guess Starter.pm needs to be patched to provide a version method, or should something else be done? Also, --version, --plugin and --class are not documented in the SYNOPSYS section. Is that on purpose? Hope this helps, Offer Kaye
Hi Offer, Show quoted text
> I would have sent a patch, but I am confused about what version to > print - always that of Module::Starter, or the selected backend?
I vote $Module::Starter::Version, since that helps users make better bug reports. Show quoted text
> If the selected backend, I guess Starter.pm needs to be patched to > provide a version method, or should something else be done?
Maybe that should be a wishlist item (possibly the sub for --version looks for an argument in @ARGV and reports on the version of that package.) --Eric
Index: bin/module-starter =================================================================== --- bin/module-starter (revision 424) +++ bin/module-starter (working copy) @@ -55,7 +55,11 @@ "license=s" => \$config{license}, force => \$config{force}, verbose => \$config{verbose}, - version => sub { print "module-starter v$Module::Starter::VERSION\n"; exit 1; }, + version => sub { + require Module::Starter; + print "module-starter v$Module::Starter::VERSION\n"; + exit 1; + }, help => sub { pod2usage(1); }, ) or pod2usage(2); @@ -92,6 +96,7 @@ (default is the same license as perl) --verbose Print progress messages while working + --version Print current Module::Starter package version --force Delete pre-existing files if needed --help Show this message