summaryrefslogtreecommitdiff
path: root/lib/overload.t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-09-13 02:34:21 +0200
committerFlorian Ragwitz <rafl@debian.org>2010-09-13 02:34:21 +0200
commit25222ff958727e01a3a480924b65ba188c7c3ea2 (patch)
treecc1a79968c5976c063c85ac47c91e9eba23fdb3f /lib/overload.t
parent92d234245893f4c155fc0cf044826a030195c3ba (diff)
downloadperl-25222ff958727e01a3a480924b65ba188c7c3ea2.tar.gz
Test %main::OVERLOAD, which was almost broken by a proposed fix for
[perl #76138].
Diffstat (limited to 'lib/overload.t')
-rw-r--r--lib/overload.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/overload.t b/lib/overload.t
index da580ca4fe..417c1cb043 100644
--- a/lib/overload.t
+++ b/lib/overload.t
@@ -47,7 +47,8 @@ sub numify { 0 + "${$_[0]}" } # Not needed, additional overhead
package main;
$| = 1;
-use Test::More tests => 4880;
+BEGIN { require './test.pl' }
+plan tests => 4881;
use Scalar::Util qw(tainted);
@@ -1990,4 +1991,12 @@ foreach my $op (qw(<=> == != < <= > >=)) {
}
}
+# Test overload from the main package
+fresh_perl_is
+ '$^W = 1; use overload q\""\ => sub {"ning"}; print bless []',
+ 'ning',
+ { switches => ['-wl'], stderr => 1 },
+ 'use overload from the main package'
+;
+
# EOF