From 01b5ef509f2ebf466fd7de2c1e7406717bb14332 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 7 Jun 2013 20:16:23 -0700 Subject: [perl #24482] Fix sort and require to treat CORE:: as keyword --- t/op/sort.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 't/op/sort.t') diff --git a/t/op/sort.t b/t/op/sort.t index 03d2ce1c69..ca749a063b 100644 --- a/t/op/sort.t +++ b/t/op/sort.t @@ -6,7 +6,7 @@ BEGIN { require 'test.pl'; } use warnings; -plan( tests => 176 ); +plan( tests => 177 ); # these shouldn't hang { @@ -119,6 +119,10 @@ cmp_ok("@b",'eq','1 2 3 4','map then sort'); cmp_ok("@b",'eq','1 2 3 4','reverse then sort'); +@b = sort CORE::reverse (4,1,3,2); +cmp_ok("@b",'eq','1 2 3 4','CORE::reverse then sort'); + + sub twoface { no warnings 'redefine'; *twoface = sub { $a <=> $b }; &twoface } eval { @b = sort twoface 4,1,3,2 }; -- cgit v1.2.1