[Rt-commit] r4937 - Locale-Maketext-Lexicon/lib/Locale/Maketext
autrijus at bestpractical.com
autrijus at bestpractical.com
Sun Apr 2 11:09:28 EDT 2006
Author: autrijus
Date: Sun Apr 2 11:09:27 2006
New Revision: 4937
Modified:
Locale-Maketext-Lexicon/lib/Locale/Maketext/Lexicon.pm
Log:
* avoid redefinition
Modified: Locale-Maketext-Lexicon/lib/Locale/Maketext/Lexicon.pm
==============================================================================
--- Locale-Maketext-Lexicon/lib/Locale/Maketext/Lexicon.pm (original)
+++ Locale-Maketext-Lexicon/lib/Locale/Maketext/Lexicon.pm Sun Apr 2 11:09:27 2006
@@ -318,11 +318,17 @@
length $lang or next;
+ # Avoid re-entry
+ my $caller = caller();
+ next if $export->isa($caller);
+
push(@{"$export\::ISA"}, scalar caller);
if (my $style = option('style')) {
my $cref = $class->can(lc("_style_$style"))->( $class, $export->can('maketext') )
or die "Unknown style: $style";
+
+ # Avoid redefinition warnings
local $SIG{__WARN__} = sub { 1 };
*{"$export\::maketext"} = $cref;
}
More information about the Rt-commit
mailing list