summaryrefslogtreecommitdiff
path: root/lib/overload.t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-05-19 13:25:28 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-21 18:09:34 -0700
commitfdd52a68b921c0fc49068fee9e70ec281c81146f (patch)
treebc981232fd3a53088978ac90a05c94411b726725 /lib/overload.t
parent1afd715501cadff423c7592278a857e01516e146 (diff)
downloadperl-fdd52a68b921c0fc49068fee9e70ec281c81146f.tar.gz
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*!
Diffstat (limited to 'lib/overload.t')
-rw-r--r--lib/overload.t24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/overload.t b/lib/overload.t
index 104b7c44b2..a3a818cf62 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;