summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2021-12-04 13:08:08 +0000
committerPaul Evans <leonerd@leonerd.org.uk>2021-12-08 14:31:17 +0000
commitccc9113906f8af7412a41ebd411e46cc1cc8f60f (patch)
tree5113d3a5f88287c2fa34a06941b5327a783e858d /ext
parentb9f7c4e2d12179801bb3a33af15aa343bb9d71db (diff)
downloadperl-ccc9113906f8af7412a41ebd411e46cc1cc8f60f.tar.gz
Use builtin::reftype/refaddr in .t files
Diffstat (limited to 'ext')
-rw-r--r--ext/Hash-Util-FieldHash/t/02_function.t15
-rw-r--r--ext/XS-APItest/t/caller.t2
2 files changed, 6 insertions, 11 deletions
diff --git a/ext/Hash-Util-FieldHash/t/02_function.t b/ext/Hash-Util-FieldHash/t/02_function.t
index df03142bba..32c00358ef 100644
--- a/ext/Hash-Util-FieldHash/t/02_function.t
+++ b/ext/Hash-Util-FieldHash/t/02_function.t
@@ -1,5 +1,9 @@
#!perl
-use strict; use warnings;
+
+use strict;
+use warnings;
+use builtin qw(refaddr);
+
use Test::More;
my $n_tests = 0;
@@ -104,7 +108,6 @@ BEGIN { $n_tests += 6 }
### id-action (stringification independent of bless)
BEGIN { $n_tests += 5 }
-# use Scalar::Util qw( refaddr);
{
my( %f, %g, %h, %i);
Hash::Util::FieldHash::_fieldhash \ %f, $fieldhash_mode;
@@ -305,14 +308,6 @@ BEGIN { plan tests => $n_tests }
#######################################################################
-sub refaddr {
- # silence possible warnings from hex() on 64bit systems
- no warnings 'portable';
-
- my $ref = shift;
- hex +($ref =~ /\(0x([[:xdigit:]]+)\)$/)[ 0];
-}
-
use Symbol qw( gensym);
BEGIN {
diff --git a/ext/XS-APItest/t/caller.t b/ext/XS-APItest/t/caller.t
index d7769e978a..4e6c65992b 100644
--- a/ext/XS-APItest/t/caller.t
+++ b/ext/XS-APItest/t/caller.t
@@ -2,10 +2,10 @@
use warnings;
use strict;
+use builtin qw(reftype);
use Test::More;
use XS::APItest;
-use Scalar::Util qw/reftype/;
BEGIN { *my_caller = \&XS::APItest::my_caller }