You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2004/03/09 07:33:55 UTC
cvs commit: modperl-2.0/ModPerl-Registry/lib/ModPerl RegistryCooker.pm
stas 2004/03/08 22:33:55
Modified: ModPerl-Registry/lib/ModPerl RegistryCooker.pm
Log:
- match FATAL category when unsetting warnings
- add a comment explaining why we need to assign empty vars/anon subs
when flushing namespaces (to avoid problems with aliases)
Revision Changes Path
1.43 +6 -1 modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
Index: RegistryCooker.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -u -r1.42 -r1.43
--- RegistryCooker.pm 4 Mar 2004 06:01:05 -0000 1.42
+++ RegistryCooker.pm 9 Mar 2004 06:33:55 -0000 1.43
@@ -195,7 +195,8 @@
}
{ # run the code and preserve warnings setup when it's done
- no warnings;
+ no warnings FATAL => 'all';
+ #local $^W = 0;
eval { $cv->($r, @_) };
ModPerl::Global::special_list_call(END => $package);
}
@@ -512,6 +513,10 @@
no strict 'refs';
my $tab = \%{ $self->{PACKAGE} . '::' };
+
+ # below we assign to a symbol first before undef'ing it, to avoid
+ # nuking aliases. If we undef directly we may undef not only the
+ # alias but the original function as well
for (keys %$tab) {
my $fullname = join '::', $self->{PACKAGE}, $_;