From: Vincent Pit Date: Thu, 25 Aug 2011 10:24:20 +0000 (+0200) Subject: Don't import Scalar::Util::set_prototype() X-Git-Tag: v0.10~3 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Prototype-Util.git;a=commitdiff_plain;h=4a302d06092850955b3c6de15940b89b207f1c54 Don't import Scalar::Util::set_prototype() As it is not present in older versions of Scalar::Util, for which we don't even need that function anyway. --- diff --git a/t/11-wrap.t b/t/11-wrap.t index a8fbb60..d24e320 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 { @@ -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; diff --git a/t/12-recall.t b/t/12-recall.t index d86235f..bc3375d 100644 --- a/t/12-recall.t +++ b/t/12-recall.t @@ -5,7 +5,7 @@ use warnings; use Test::More tests => 8 + 20 + (("$]" >= 5.010) ? 4 : 0); -use Scalar::Util qw; +use Scalar::Util; use Sub::Prototype::Util qw; sub exception { @@ -57,7 +57,7 @@ my @tests = ( sub myit { push @{$_[0]->[2]}, 3; return 4 }; if ("$]" >= 5.010) { - set_prototype \&myit, '_'; + Scalar::Util::set_prototype(\&myit, '_'); push @tests, [ 'main::myit', '_ with argument', [ [ 1, 2, [ ] ], 5 ], [ [ 1, 2, [ 3 ] ], 5 ],