From 5d302a6312e0109e1c370b991f1a72421ab6dd4c Mon Sep 17 00:00:00 2001 From: Slaven Rezic Date: Wed, 8 Jun 2016 23:33:10 +0200 Subject: [PATCH] perl 5.23.4 and later do not have lexical underscore anymore (RT #108203) --- lib/lexical/underscore.pm | 2 +- t/01basic.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lexical/underscore.pm b/lib/lexical/underscore.pm index c372970..9c77187 100644 --- a/lib/lexical/underscore.pm +++ b/lib/lexical/underscore.pm @@ -9,7 +9,7 @@ BEGIN { $lexical::underscore::VERSION = '0.003'; } -use if $] >= 5.009, PadWalker => qw( peek_my ); +use if $] >= 5.009 && $] < 5.023004, PadWalker => qw( peek_my ); BEGIN { *peek_my = sub { +{} } unless __PACKAGE__->can('peek_my'); } diff --git a/t/01basic.t b/t/01basic.t index bece8ab..10de45d 100644 --- a/t/01basic.t +++ b/t/01basic.t @@ -2,7 +2,7 @@ no if $] > 5.018000, warnings => qw(experimental); use Test::More; BEGIN { - $] >= 5.010 or plan skip_all => "test requires Perl 5.010"; + ($] >= 5.010 and $] < 5.023004) or plan skip_all => "test requires Perl 5.10.0 .. 5.23.3"; plan tests => 6; }; -- 2.1.4