From: Peter Rabbitson Date: Wed, 21 Dec 2011 10:05:36 +0000 (+0100) Subject: Install the debugger fixup deps iff can_cc (RT#72368) X-Git-Tag: 0.22~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b3279c1cce532719c9ac97a0e74afe51281dd9b1;p=p5sagit%2Fnamespace-clean.git Install the debugger fixup deps iff can_cc (RT#72368) --- diff --git a/Changes b/Changes index f7cc862..e3a6849 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ - Limit the debugger workarounds to perls between 5.8.8 and 5.14, extend debugger support to all perl versions (FC) (RT#69862) + - If possible, automatically install (but not load) the debugger + workaround libraries on perls between 5.8.8 and 5.14 (RT#72368) - Add back dropped NAME section (RT#70259) [0.21] diff --git a/Makefile.PL b/Makefile.PL index d1a2d0c..1deccc5 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -16,8 +16,16 @@ my %RUN_DEPS = ( ); my %OPT_RUN_DEPS = (can_cc() ? ( - 'B::Hooks::EndOfScope' => '0.07', # when changing, also change version in namespace/clean.pm - is_smoker() ? ( 'Devel::Hide' => 0 ) : (), # make sure we smoke the pure-perl version + 'B::Hooks::EndOfScope' => '0.07', # when changing, also change $b_h_eos_req in namespace/clean.pm + + # these pieces are needed if using the debugger on the perl range + ($] > 5.008_008_9 && $] < 5.013_006_1) + ? ( 'Sub::Name' => '0.04', 'Sub::Identify' => '0.04' ) # when changing, also change $sn_ver and $si_ver in namespace/clean.pm + : () + , + + # make sure we smoke the pure-perl version + is_smoker() ? ( 'Devel::Hide' => 0 ) : (), ) : () ); my %META_BITS = ( diff --git a/lib/namespace/clean.pm b/lib/namespace/clean.pm index 5e23ab2..84d203e 100644 --- a/lib/namespace/clean.pm +++ b/lib/namespace/clean.pm @@ -246,10 +246,13 @@ my $DebuggerFixup = sub { if (RENAME_SUB) { if (! defined $sub_utils_loaded ) { $sub_utils_loaded = do { + + # when changing version also change in Makefile.PL my $sn_ver = 0.04; eval { require Sub::Name; Sub::Name->VERSION($sn_ver) } or die "Sub::Name $sn_ver required when running under -d or equivalent: $@"; + # when changing version also change in Makefile.PL my $si_ver = 0.04; eval { require Sub::Identify; Sub::Identify->VERSION($si_ver) } or die "Sub::Identify $si_ver required when running under -d or equivalent: $@";