X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F11-wrap.t;h=1359de1db3d656bd035dab5fb52886c6c83b83a5;hb=ca56c1bbdfba6214aa3ba64a8c14bd96061821ee;hp=a8fbb600be01e20dd0cd78cdd1bd63135e5144ef;hpb=cb4330ca38fd217d3886ea0fb161e5cc3ccdfd2c;p=perl%2Fmodules%2FSub-Prototype-Util.git diff --git a/t/11-wrap.t b/t/11-wrap.t index a8fbb60..1359de1 100644 --- a/t/11-wrap.t +++ b/t/11-wrap.t @@ -5,7 +5,7 @@ use warnings; use Test::More tests => 7 + 6 + 3 + 1 + 6 + 1 + (("$]" >= 5.010) ? 2 : 0) + 1; -use Scalar::Util qw; +use Scalar::Util; use Sub::Prototype::Util qw; sub exception { @@ -31,8 +31,8 @@ eval { wrap 'hlagh', qw }; like $@, exception('Optional arguments'), 'recall takes options in a key => value list'; -my $push_exp = "$]" >= 5.013007 ? '{ CORE::push($_[0], @_[1..$#_]) }' - : '{ CORE::push(@{$_[0]}, @_[1..$#_]) }'; +my $push_exp = "$]" >= 5.013_007 ? '{ CORE::push($_[0], @_[1..$#_]) }' + : '{ CORE::push(@{$_[0]}, @_[1..$#_]) }'; my $push = wrap 'CORE::push', compile => 0; is($push, 'sub ' . $push_exp, 'wrap push as a sub (default)'); $push = wrap 'CORE::push', sub => 1, compile => 0; @@ -130,7 +130,7 @@ is($noproto, $noproto_exp, 'no prototype'); sub myit { my $ar = shift; push @$ar, @_; }; if ("$]" >= 5.010) { - set_prototype \&myit, '\@$_'; + Scalar::Util::set_prototype(\&myit, '\@$_'); my $it = wrap 'main::myit'; my @a = qw; local $_ = 7;