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

People
Owner: rjbs [...] cpan.org
Requestors: muskrat [...] mindless.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.02
  • 0.04
  • 1.00
  • 1.01_01
  • 1.20
  • 1.22
  • 1.25_01
  • 1.25_02
  • 1.30
  • 1.34
Fixed in: (no value)



Subject: uninitialized value in concatenation
This is for Module-Starter-1.34 but I imagine that it affects all previous versions as well. I'm running ActiveState Perl 5.8.6 (MSWin32-x86-multi-thread) on Windows XP Pro. I installed Module::Starter tonight at home and I ran the code from the Module::Starter synopsis. C:\Code>module-starter --module=Foo::Bar,Foo::Bat --author="Andy Lester" --email=andy@petdance.com Use of uninitialized value in concatenation (.) or string at C:\Perl\bin\module-starter line 30. Created starter directories and files So I looked at line 30 of module-starter and I see: my $configdir = $ENV{MODULE_STARTER_DIR} || ($ENV{HOME} . '/.module-starter'); This is interesting. $ENV{HOME} is being used blindly if $ENV{MODULE_STARTER_DIR} is not true. At the very least, it should default to using an empty string if neither of the environment variables have values. An alternative solution would be to check the operating system and attempt to figure out which environment variable to fallback on. On Windows XP, I think the most sensable environment variable to use would be $ENV{USERPROFILE}. Also, you might want to consider updating the documentation for Module::Starter to add a 'See also' section that points users at the module-starter documentation since that is where the configuration is described.
[MMUSGROVE - Wed Feb 2 21:07:52 2005]: Show quoted text
> So I looked at line 30 of module-starter and I see: > my $configdir = $ENV{MODULE_STARTER_DIR} || ($ENV{HOME} . '/.module- > starter'); > This is interesting. $ENV{HOME} is being used blindly if > $ENV{MODULE_STARTER_DIR} is not true. At the very least, it should > default to using an empty string if neither of the environment > variables have values. An alternative solution would be to check > the operating system and attempt to figure out which environment > variable to fallback on. On Windows XP, I think the most sensable > environment variable to use would be $ENV{USERPROFILE}.
The quick fix would be to replace line 30 with either this: my $configdir = $ENV{MODULE_STARTER_DIR} || (defined $ENV{HOME}) ? $ENV{HOME} . '/.module-starter' : ''; or this: my $configdir = $ENV{MODULE_STARTER_DIR} || ($ENV{HOME}) ? $ENV{HOME} . '/.module-starter' : '';