Subject: | receive "Useless localization of scalar assignment at Exception-Class-TCF/lib/Exception/Class/TCF.pm line 255." in Perl 5.10 - see included patch for workaround |
Useless localization of scalar assignment at
Exception-Class-TCF/lib/Exception/Class/TCF.pm line 255.
Index: lib/Exception/Class/TCF.pm
===================================================================
--- lib/Exception/Class/TCF.pm (revision 83)
+++ lib/Exception/Class/TCF.pm (working copy)
@@ -251,8 +251,11 @@
my($block,@catches) = @_;
my($exc,@args,$res);
&$pushFrame;
- $HANDLE_WARN &&
- local ( $SIG{'__WARN__'} = sub { throw
Exception::Class::TCF::Warning @_; } );
+
+ if ($HANDLE_WARN) {
+ local ( $SIG{'__WARN__'} ) = sub { throw
Exception::Class::TCF::Warning @_; };
+ }
+
$dTHROWING = 0;
$res = eval { &$block() };
$exc = $EXCEPTION;