|
|
3ef46f |
From d432fdba21ba5c1ba3008b2a21e44920c329ab1f Mon Sep 17 00:00:00 2001
|
|
|
3ef46f |
From: Jitka Plesnikova <jplesnik@redhat.com>
|
|
|
3ef46f |
Date: Thu, 24 May 2018 10:36:25 +0200
|
|
|
3ef46f |
Subject: [PATCH] Upgrade to 1.29
|
|
|
3ef46f |
|
|
|
3ef46f |
---
|
|
|
3ef46f |
lib/Locale/Maketext.pm | 13 ++++++-------
|
|
|
3ef46f |
lib/Locale/Maketext.pod | 2 +-
|
|
|
3ef46f |
t/60_super.t | 15 ++++++---------
|
|
|
3ef46f |
t/70_fail_auto.t | 6 ++----
|
|
|
3ef46f |
4 files changed, 15 insertions(+), 21 deletions(-)
|
|
|
3ef46f |
|
|
|
3ef46f |
diff --git a/lib/Locale/Maketext.pm b/lib/Locale/Maketext.pm
|
|
|
3ef46f |
index 36d0c05..f70438b 100644
|
|
|
3ef46f |
--- a/lib/Locale/Maketext.pm
|
|
|
3ef46f |
+++ b/lib/Locale/Maketext.pm
|
|
|
3ef46f |
@@ -1,7 +1,6 @@
|
|
|
3ef46f |
package Locale::Maketext;
|
|
|
3ef46f |
use strict;
|
|
|
3ef46f |
-use vars qw( @ISA $VERSION $MATCH_SUPERS $USING_LANGUAGE_TAGS
|
|
|
3ef46f |
-$USE_LITERALS $MATCH_SUPERS_TIGHTLY);
|
|
|
3ef46f |
+our $USE_LITERALS;
|
|
|
3ef46f |
use Carp ();
|
|
|
3ef46f |
use I18N::LangTags ();
|
|
|
3ef46f |
use I18N::LangTags::Detect ();
|
|
|
3ef46f |
@@ -26,12 +25,12 @@ BEGIN {
|
|
|
3ef46f |
}
|
|
|
3ef46f |
|
|
|
3ef46f |
|
|
|
3ef46f |
-$VERSION = '1.28';
|
|
|
3ef46f |
-@ISA = ();
|
|
|
3ef46f |
+our $VERSION = '1.29';
|
|
|
3ef46f |
+our @ISA = ();
|
|
|
3ef46f |
|
|
|
3ef46f |
-$MATCH_SUPERS = 1;
|
|
|
3ef46f |
-$MATCH_SUPERS_TIGHTLY = 1;
|
|
|
3ef46f |
-$USING_LANGUAGE_TAGS = 1;
|
|
|
3ef46f |
+our $MATCH_SUPERS = 1;
|
|
|
3ef46f |
+our $MATCH_SUPERS_TIGHTLY = 1;
|
|
|
3ef46f |
+our $USING_LANGUAGE_TAGS = 1;
|
|
|
3ef46f |
# Turning this off is somewhat of a security risk in that little or no
|
|
|
3ef46f |
# checking will be done on the legality of tokens passed to the
|
|
|
3ef46f |
# eval("use $module_name") in _try_use. If you turn this off, you have
|
|
|
3ef46f |
diff --git a/lib/Locale/Maketext.pod b/lib/Locale/Maketext.pod
|
|
|
3ef46f |
index 564e5af..24c8f24 100644
|
|
|
3ef46f |
--- a/lib/Locale/Maketext.pod
|
|
|
3ef46f |
+++ b/lib/Locale/Maketext.pod
|
|
|
3ef46f |
@@ -1226,7 +1226,7 @@ If you get tired of constantly saying C<print $lh-E<gt>maketext>,
|
|
|
3ef46f |
consider making a functional wrapper for it, like so:
|
|
|
3ef46f |
|
|
|
3ef46f |
use Projname::L10N;
|
|
|
3ef46f |
- use vars qw($lh);
|
|
|
3ef46f |
+ our $lh;
|
|
|
3ef46f |
$lh = Projname::L10N->get_handle(...) || die "Language?";
|
|
|
3ef46f |
sub pmt (@) { print( $lh->maketext(@_)) }
|
|
|
3ef46f |
# "pmt" is short for "Print MakeText"
|
|
|
3ef46f |
diff --git a/t/60_super.t b/t/60_super.t
|
|
|
3ef46f |
index d54fc33..5ac0959 100644
|
|
|
3ef46f |
--- a/t/60_super.t
|
|
|
3ef46f |
+++ b/t/60_super.t
|
|
|
3ef46f |
@@ -9,23 +9,20 @@ BEGIN {
|
|
|
3ef46f |
|
|
|
3ef46f |
{
|
|
|
3ef46f |
package Whunk::L10N;
|
|
|
3ef46f |
- use vars qw(@ISA %Lexicon);
|
|
|
3ef46f |
- @ISA = 'Locale::Maketext';
|
|
|
3ef46f |
- %Lexicon = ('hello' => 'SROBLR!');
|
|
|
3ef46f |
+ our @ISA = 'Locale::Maketext';
|
|
|
3ef46f |
+ our %Lexicon = ('hello' => 'SROBLR!');
|
|
|
3ef46f |
}
|
|
|
3ef46f |
|
|
|
3ef46f |
{
|
|
|
3ef46f |
package Whunk::L10N::en;
|
|
|
3ef46f |
- use vars qw(@ISA %Lexicon);
|
|
|
3ef46f |
- @ISA = 'Whunk::L10N';
|
|
|
3ef46f |
- %Lexicon = ('hello' => 'HI AND STUFF!');
|
|
|
3ef46f |
+ our @ISA = 'Whunk::L10N';
|
|
|
3ef46f |
+ our %Lexicon = ('hello' => 'HI AND STUFF!');
|
|
|
3ef46f |
}
|
|
|
3ef46f |
|
|
|
3ef46f |
{
|
|
|
3ef46f |
package Whunk::L10N::zh_tw;
|
|
|
3ef46f |
- use vars qw(@ISA %Lexicon);
|
|
|
3ef46f |
- @ISA = 'Whunk::L10N';
|
|
|
3ef46f |
- %Lexicon = ('hello' => 'NIHAU JOE!');
|
|
|
3ef46f |
+ our @ISA = 'Whunk::L10N';
|
|
|
3ef46f |
+ our %Lexicon = ('hello' => 'NIHAU JOE!');
|
|
|
3ef46f |
}
|
|
|
3ef46f |
|
|
|
3ef46f |
$ENV{'REQUEST_METHOD'} = 'GET';
|
|
|
3ef46f |
diff --git a/t/70_fail_auto.t b/t/70_fail_auto.t
|
|
|
3ef46f |
index 44fe54d..df0de3e 100644
|
|
|
3ef46f |
--- a/t/70_fail_auto.t
|
|
|
3ef46f |
+++ b/t/70_fail_auto.t
|
|
|
3ef46f |
@@ -9,14 +9,12 @@ BEGIN {
|
|
|
3ef46f |
|
|
|
3ef46f |
{
|
|
|
3ef46f |
package Whunk::L10N;
|
|
|
3ef46f |
- use vars qw(@ISA);
|
|
|
3ef46f |
- @ISA = 'Locale::Maketext';
|
|
|
3ef46f |
+ our @ISA = 'Locale::Maketext';
|
|
|
3ef46f |
}
|
|
|
3ef46f |
|
|
|
3ef46f |
{
|
|
|
3ef46f |
package Whunk::L10N::en;
|
|
|
3ef46f |
- use vars qw(@ISA);
|
|
|
3ef46f |
- @ISA = 'Whunk::L10N';
|
|
|
3ef46f |
+ our @ISA = 'Whunk::L10N';
|
|
|
3ef46f |
}
|
|
|
3ef46f |
|
|
|
3ef46f |
my $lh = Whunk::L10N->get_handle('en');
|
|
|
3ef46f |
--
|
|
|
3ef46f |
2.14.3
|
|
|
3ef46f |
|