Fix a test that wasn’t testing was it purported to be testing
Rafael Garcia-Suarez [Mon, 7 Dec 2009 14:03:48 +0000 (15:03 +0100)]
(noticed by Father Chrysostomos, further modified to avoid using
too much overloaded names like foo and Foo.)

t/op/sort.t

index 24e1713..6261f22 100644 (file)
@@ -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);