From: Rafael Kitover Date: Thu, 17 Jun 2010 02:44:10 +0000 (-0400) Subject: don't pollute M::I plugin detector with GetOptions symbol from GetOpt::Long X-Git-Tag: 1.29~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Devel.git;a=commitdiff_plain;h=09a0d4962f8eadab1bd6312b6eeaf9ba99a2159a don't pollute M::I plugin detector with GetOptions symbol from GetOpt::Long --- diff --git a/Changes b/Changes index 9956a44..7b21b7d 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ This file documents the revision history for Perl extension Catalyst-Devel. + - don't pollute M::I plugin detector with GetOptions symbol from + GetOpt::Long + 1.28 2010-06-16 02:43:00 - Fix generated Pod tests so that the first check is if the TEST_POD environment variable is set. (RT#58433) diff --git a/lib/Module/Install/Catalyst.pm b/lib/Module/Install/Catalyst.pm index cd29c7e..2dfae94 100644 --- a/lib/Module/Install/Catalyst.pm +++ b/lib/Module/Install/Catalyst.pm @@ -10,7 +10,7 @@ use File::Find; use FindBin; use File::Copy::Recursive 'rcopy'; use File::Spec (); -use Getopt::Long qw(GetOptionsFromString :config no_ignore_case); +use Getopt::Long (); use Data::Dumper; my $SAFETY = 0; @@ -214,13 +214,17 @@ catalyst_par_options(). sub catalyst_par_options { my ( $self, $optstring ) = @_; - my %o = (); eval "use PAR::Packer ()"; if ($@) { warn "WARNING: catalyst_par_options ignored - you need PAR::Packer\n" } else { - GetOptionsFromString($optstring, \%o, PAR::Packer->options); + my $p = Getopt::Long::Parser->new(config => ['no_ignore_case']); + my %o; + { + local @ARGV = $optstring; + $p->getoptions(\%o, PAR::Packer->options); + } %PAROPTS = ( %PAROPTS, %o); } }