locale.t: Don't destroy caller's $@
authorKarl Williamson <public@khwilliamson.com>
Wed, 14 Dec 2011 04:16:50 +0000 (21:16 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 14 Dec 2011 17:56:57 +0000 (10:56 -0700)
This bug was very hard for me to find.  Leave the outside $@ untouched.

lib/locale.t

index a66810b..c2bc3d1 100644 (file)
@@ -75,6 +75,7 @@ sub ok {
 sub is_tainted { # hello, camel two.
     no warnings 'uninitialized' ;
     my $dummy;
+    local $@;
     not eval { $dummy = join("", @_), kill 0; 1 }
 }