summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgs@consttype.org>2009-12-07 15:03:48 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2009-12-07 15:03:48 +0100
commit7f4622ecb46636e776e5a134c72847bbb795126c (patch)
treef23b5333b84e1f2ab851522a6a6d3c306f3f4f88 /t
parent8a27a13e89107aaf68c0748b68ee71fbd86d774b (diff)
downloadperl-7f4622ecb46636e776e5a134c72847bbb795126c.tar.gz
Fix a test that wasn’t testing was it purported to be testing
(noticed by Father Chrysostomos, further modified to avoid using too much overloaded names like foo and Foo.)
Diffstat (limited to 't')
-rw-r--r--t/op/sort.t10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/op/sort.t b/t/op/sort.t
index 24e171351a..6261f22a59 100644
--- a/t/op/sort.t
+++ b/t/op/sort.t
@@ -777,13 +777,13 @@ cmp_ok($answer,'eq','good','sort subr called from other package');
# Sorting shouldn't increase the refcount of a sub
{
- sub foo {(1+$a) <=> (1+$b)}
- my $refcnt = &Internals::SvREFCNT(\&foo);
- @output = sort foo 3,7,9;
+ sub sportello {(1+$a) <=> (1+$b)}
+ my $refcnt = &Internals::SvREFCNT(\&sportello);
+ @output = sort sportello 3,7,9;
{
- package Foo;
- ::is($refcnt, &Internals::SvREFCNT(\&foo), "sort sub refcnt");
+ package Doc;
+ ::is($refcnt, &Internals::SvREFCNT(\&::sportello), "sort sub refcnt");
$fail_msg = q(Modification of a read-only value attempted);
# Sorting a read-only array in-place shouldn't be allowed
my @readonly = (1..10);