]> git.vpit.fr Git - perl/modules/Sub-Prototype-Util.git/commitdiff
Don't import Scalar::Util::set_prototype()
authorVincent Pit <vince@profvince.com>
Thu, 25 Aug 2011 10:24:20 +0000 (12:24 +0200)
committerVincent Pit <vince@profvince.com>
Thu, 25 Aug 2011 10:24:20 +0000 (12:24 +0200)
As it is not present in older versions of Scalar::Util, for which we don't
even need that function anyway.

t/11-wrap.t
t/12-recall.t

index a8fbb600be01e20dd0cd78cdd1bd63135e5144ef..d24e3204d82066f62710cb6deb995b77b256e2a0 100644 (file)
@@ -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<set_prototype>;
+use Scalar::Util;
 use Sub::Prototype::Util qw<wrap>;
 
 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<u v w>;
  local $_ = 7;
index d86235fae3b056a5b673f3f10c9a2fe2d88f944d..bc3375d6f3753ae4d48fe475bdf4abfa6c3e8b06 100644 (file)
@@ -5,7 +5,7 @@ use warnings;
 
 use Test::More tests => 8 + 20 + (("$]" >= 5.010) ? 4 : 0);
 
-use Scalar::Util         qw<set_prototype>;
+use Scalar::Util;
 use Sub::Prototype::Util qw<recall>;
 
 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 ],