Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Locale-Maketext CPAN distribution.

Report information
The Basics
Id: 26992
Status: resolved
Priority: 0/
Queue: Locale-Maketext

People
Owner: Nobody in particular
Requestors: SMPETERS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.11_01
Fixed in: (no value)



Subject: [PATCH] Patches from bleadperl
==== //depot/perl/lib/Locale/Maketext.pm#11 (text) ==== @@ -14,7 +14,7 @@ BEGIN { unless(defined &DEBUG) { *DEBUG = sub () {0} } } # define the constant 'DEBUG' at compile-time -$VERSION = "1.09"; +$VERSION = "1.09_01"; @ISA = (); $MATCH_SUPERS = 1; @@ -175,6 +175,9 @@ my($handle, $phrase) = splice(@_,0,2); + # Don't interfere with $@ in case that's being interpolated into the msg. + local $@; + # Look up the value: my $value; --- /dev/null 2007-05-01 21:43:49.654743800 -0500 +++ t/30_local.t 2006-12-29 20:28:54.000000000 -0600 @@ -0,0 +1,30 @@ + +require 5; +use Test; +BEGIN { plan tests => 4; } +use Locale::Maketext; +print "# Hi there...\n"; +ok 1; + +print "# --- Making sure that Perl globals are localized ---\n"; + +# declare a class... +{ + package Woozle; + @ISA = ('Locale::Maketext'); + %Lexicon = ( + _AUTO => 1 + ); + keys %Lexicon; # dodges the 'used only once' warning +} + +my $lh; +print "# Basic sanity:\n"; +ok defined( $lh = Woozle->new() ) && ref($lh); + +print "# Make sure \$@ is localized...\n"; +$@ = 'foo'; +ok $lh && $lh->maketext('Eval error: [_1]', $@), "Eval error: foo"; + +print "# Byebye!\n"; +ok 1;
Thanks. The localization, but not the .t file, was already in the source.