summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Dintelmann <Peter.Dintelmann@Dresdner-Bank.com>2007-10-24 14:31:20 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-10-24 11:15:03 +0000
commitadfdc6a8eae049d641e732f3b68e2443d86b1aef (patch)
tree403b468ba7434593d8012b15d5e0207a8d77eaef
parent4c38808d92b95edd5d3bf512019007a1e4a385d9 (diff)
downloadperl-adfdc6a8eae049d641e732f3b68e2443d86b1aef.tar.gz
warning from ext/Hash/Util/FieldHash/t/02_function.t
From: "Dintelmann, Peter" <Peter.Dintelmann@Dresdner-Bank.com> Message-ID: <3852726AFA94DE4F87E616F13F416A5FB66DE3@naimucu1.ffz00k.rootdom.net> p4raw-id: //depot/perl@32185
-rw-r--r--ext/Hash/Util/FieldHash/t/02_function.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/Hash/Util/FieldHash/t/02_function.t b/ext/Hash/Util/FieldHash/t/02_function.t
index 636528996a..738209c146 100644
--- a/ext/Hash/Util/FieldHash/t/02_function.t
+++ b/ext/Hash/Util/FieldHash/t/02_function.t
@@ -122,7 +122,7 @@ BEGIN { $n_tests += 5 }
$f{ $key} = $val;
is( $f{ $key}, $val, "plain key set in field");
my ( $id) = keys %f;
- my $refaddr = hex +($key =~ /\(0x([[:xdigit:]]+)\)$/)[ 0];
+ my $refaddr = refaddr($key);
is $id, $refaddr, "key is refaddr";
bless $key;
is( $f{ $key}, $val, "access through blessed");
@@ -314,6 +314,9 @@ 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];
}