From fdd52a68b921c0fc49068fee9e70ec281c81146f Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sat, 19 May 2012 13:25:28 -0700 Subject: [PATCH] overload.t: Move a test This block of tests was added by commit d411a6a9eb in the middle of the numify tests, separating the Numify package from the tests that used it. The diff makes it look as though the Numify package got moved down, but I can assure you that I moved the perl31793 block *up*! --- lib/overload.t | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/overload.t b/lib/overload.t index 104b7c4..a3a818c 100644 --- a/lib/overload.t +++ b/lib/overload.t @@ -1119,18 +1119,6 @@ like ($@, qr/zap/); } { - package Numify; - use overload (qw(0+ numify fallback 1)); - - sub new { - my $val = $_[1]; - bless \$val, $_[0]; - } - - sub numify { ${$_[0]} } -} - -{ package perl31793; use overload cmp => sub { 0 }; package perl31793_fb; @@ -1151,6 +1139,18 @@ like ($@, qr/zap/); like(overload::StrVal($no), qr/^no_overload=ARRAY\(0x[0-9a-f]+\)$/); } +{ + package Numify; + use overload (qw(0+ numify fallback 1)); + + sub new { + my $val = $_[1]; + bless \$val, $_[0]; + } + + sub numify { ${$_[0]} } +} + # These are all check that overloaded values rather than reference addresses # are what is getting tested. my ($two, $one, $un, $deux) = map {new Numify $_} 2, 1, 1, 2; -- 2.7.4