Author: gozer
Date: Wed Nov  9 14:23:43 2005
New Revision: 332160

URL: http://svn.apache.org/viewcvs?rev=332160&view=rev
Log:
Fixup to change 331630. It's better to localize $@ before calling
eval if we don't care about $@ and don't want to clobber the caller's
[EMAIL PROTECTED]

Limit the scope of the eval to the fileno/close block


Modified:
    perl/modperl/trunk/xs/ModPerl/Util/Util_pm

Modified: perl/modperl/trunk/xs/ModPerl/Util/Util_pm
URL: 
http://svn.apache.org/viewcvs/perl/modperl/trunk/xs/ModPerl/Util/Util_pm?rev=332160&r1=332159&r2=332160&view=diff
==============================================================================
--- perl/modperl/trunk/xs/ModPerl/Util/Util_pm (original)
+++ perl/modperl/trunk/xs/ModPerl/Util/Util_pm Wed Nov  9 14:23:43 2005
@@ -22,7 +22,6 @@
         my $fullname = join '::', $package, $_;
         # code/hash/array/scalar might be imported make sure the gv
         # does not point elsewhere before undefing each
-        eval {
             if (%$fullname) {
                 *{$fullname} = {};
                 undef %$fullname;
@@ -48,11 +47,13 @@
                 undef &$fullname;
             }
             if (*{$fullname}{IO}) {
-                if (fileno $fullname) {
-                    close $fullname;
-                }
+                local $@;
+                eval {
+                    if (fileno $fullname) {
+                        close $fullname;
+                    }
+                };
             }
-        };
     }
 
     #Wipe from %INC


Reply via email to