thanks! I'll have that addressed ASAP
On Mar 2, 2010, at 11:36 AM, Horst-W. Radners via RT wrote:
> Tue Mar 02 12:36:15 2010: Request 55149 was acted upon.
> Transaction: Ticket created by horst@radners.de
> Queue: Locale-Maketext-Utils
> Subject: Locale::Maketext::Utils 0.18, erroneus dependency on
> Locales::Language
> Broken in: (no value)
> Severity: (no value)
> Owner: Nobody
> Requestors: horst@radners.de
> Status: new
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=55149 >
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dear Daniel,
>
> after updating to Perl 5.10 and renewing all the CPAN-modules I
> need, I
> was not successful in installing your module 'Locale::Maketext::Utils
> 0.18' since it still depends on 'Locales::Language'. Unfortunately the
> newer versions of 'Locales' (0.15) don't provide this anymore, as you
> may know ;-)
>
> I have adapted Utils.pm to 'Locales 0.15', and modified the tests
> accordingly (and corrected a typo).
> Please find the patches attached. Additionally it may 'use Locales
> 0.15;' instead of 'require Locales;' to improve stability.
>
> I would appreciate it, if you could consider to integrate this in your
> Locale::Maketext::Utils distribution.
>
> Best regards, Horst
> - --
> Horst-W. Radners
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.12 (GNU/Linux)
>
> iEYEARECAAYFAkuNTEcACgkQQejbmWbMnMOtggCbB+z23reOq4j2Xu78+D33zu5E
> 4yMAnRCE+z/N6VbD2rW84cMsA+U1amlM
> =Qnhc
> -----END PGP SIGNATURE-----
>
> --- 0.18/Utils.pm 2010-03-02 17:53:58.000000000 +0100
> +++ HR/Utils.pm 2010-03-02 18:13:43.000000000 +0100
> @@ -184,39 +184,34 @@
> }
> }
>
> - require Locales::Language; # only needed here, so we don't
> use() it
> + require Locales; # only needed here, so we don't use() it
>
> - local $Locales::Base::SIG{__WARN__} = sub { }; # stifle
> copious and useless-for-our-purposes warn()'s ...
> + local $Locales::SIG{__WARN__} = sub { }; # stifle copious
> and useless-for-our-purposes warn()'s ...
>
> - my $obj_two_char = substr( $lh->language_tag(), 0, 2 ); #
> Locales::Language only does two char ...
> + my $obj_two_char = substr( $lh->language_tag(), 0, 2 ); #
> Locales only does two char ...
>
> my $langname = {};
> my $native = wantarray ? {} : undef;
> - my $getLocale = Locales::Language::getLocale();
> -
> - Locales::Language::setLocale($obj_two_char);
> + my $locale = Locales->new($obj_two_char);
>
> for my $code ( 'en', @langcodes ) { # en
> since its "built in"
> - my $two_char = substr( $code, 0, 2 ); #
> Locales::Language only does two char ...
> + my $two_char = substr( $code, 0, 2 ); #
> Locales only does two char ...
> my $left_ovr = length $code > 2 ? uc( substr( $code, 3 ) ) :
> '';
> - my $long_nam = Locales::Language::code2language($two_char);
> + my $long_nam = ucfirst $locale->code2language($two_char);
>
> $langname->{$code} = $long_nam || $code;
> $langname->{$code} .= " ($left_ovr)" if $left_ovr &&
> $long_nam;
>
> if ( defined $native ) {
> - Locales::Language::setLocale($code);
> -
> - my $long_nam =
> Locales::Language::code2language($two_char);
> + my $native_lc = Locales->new($two_char);
> + my $long_nam;
> + $long_nam = ucfirst $native_lc->code2language($two_char)
> + if defined $native_lc;
> $native->{$code} = $long_nam || $code;
> $native->{$code} .= " ($left_ovr)" if $left_ovr &&
> $long_nam;
> -
> - Locales::Language::setLocale($obj_two_char);
> }
> }
>
> - Locales::Language::setLocale($getLocale);
> -
> return wantarray ? ( $langname, $native ) : $langname;
> }
>
> --- 0.18/Utils.pod 2010-03-02 17:53:58.000000000 +0100
> +++ HR/Utils.pod 2010-03-02 18:16:14.000000000 +0100
> @@ -148,11 +148,11 @@
>
> =back
>
> -The module it uses for lookup (L<Locales::Language>) is only
> required when this method is called. Make sure you have the latest
> verison of L<Locales> as 0.04 (i.e. L<Locales::Base> 0.03) is buggy!
> +The module it uses for lookup (L<Locales>) is only required when
> this method is called. Make sure you have at least version 0.15 of
> L<Locales> as 0.04 (i.e. L<Locales::Base> 0.03) is buggy!
>
> -The module it uses for lookup (L<Locales::Language>) is currently
> limited to two character codes but we try to handle it gracefully
> here.
> +The module it uses for lookup (L<Locales>) is currently limited to
> two character codes but we try to handle it gracefully here.
>
> -In array context it will build and return an additional hashref
> with the same keys whose values are the language name in the
> langueage itself.
> +In array context it will build and return an additional hashref
> with the same keys whose values are the language name in the
> language itself.
>
> Does not ensure that the tags are loadable, to do that see below.
>
> @@ -737,9 +737,9 @@
>
> =head1 SEE ALSO
>
> -L<Locale::Maketext>, L<Locales::Language>,
> L<Locale::Maketext::Pseudo>
> +L<Locale::Maketext>, L<Locales>, L<Locale::Maketext::Pseudo>
>
> -If you use L</$lh->lang_names_hashref()> or L</$lh-
> >loadable_lang_names_hashref()> make sure you have the latest
> verison of L<Locales> as 0.04 (i.e. L<Locales::Base> 0.03) is buggy!
> +If you use L</$lh->lang_names_hashref()> or L</$lh-
> >loadable_lang_names_hashref()> make sure you have at least version
> 0.15 of L<Locales> as 0.04 (i.e. L<Locales::Base> 0.03) is buggy!
>
> =head1 TODO
>
> @@ -776,4 +776,4 @@
> it under the same terms as Perl itself, either Perl version 5.8.6 or,
> at your option, any later version of Perl 5 you may have available.
>
> -=cut
> \ Kein Zeilenumbruch am Dateiende.
> +=cut
> --- 0.18/00.Locale-Maketext-Utils.t 2010-03-02 17:53:32.000000000
> +0100
> +++ HR/00.Locale-Maketext-Utils.t 2010-03-02 18:25:43.000000000 +0100
> @@ -67,7 +67,7 @@
> local $ENV{'maketext_obj_skip_env'} = 1;
> local $ENV{'maketext_obj'} = 'CURRENT VALUE';
> my $noarg = TestApp::Localize->get_handle();
> - # depending on their Locales::Base may not have one of these
> + # depending on their Locales may not have one of these
> ok($noarg->language_tag() eq 'en' || $noarg->language_tag() eq
> 'en-us', 'get_handle no arg');
>
> my $first_lex = (@{ $noarg->_lex_refs() })[0];
> @@ -79,7 +79,7 @@
> }
>
> my $no_arg = TestApp::Localize->get_handle();
> -ok(ref($no_arg) eq 'TestApp::Localize::en_us', 'no argument has
> highest level langtag NS');
> +ok(ref($no_arg) eq 'TestApp::Localize::en', 'no argument has
> highest level langtag NS');
>
> my $en = TestApp::Localize->get_handle('en');
> ok($ENV{'maketext_obj'} eq $en, 'ENV maketext_obj_skip_env false');
> @@ -250,10 +250,10 @@
> ok($fr_hr->{'xxyyzz'} eq 'xxyyzz', 'names fake');
>
> my $sig_warn = exists $SIG{__WARN__} && defined $SIG{__WARN__} ?
> $SIG{__WARN__} : 'no exists/defined';
> -my $base_sig_warn = exists $Locales::Base::SIG{__WARN__} && defined
> $Locales::Base::SIG{__WARN__} ? $Locales::Base::SIG{__WARN__} : 'no
> exists/defined';
> +my $base_sig_warn = exists $Locales::SIG{__WARN__} && defined
> $Locales::SIG{__WARN__} ? $Locales::SIG{__WARN__} : 'no exists/
> defined';
> my ($loc_hr, $nat_hr) = $fr->lang_names_hashref('en-uk', 'it',
> 'xxyyzz');
> my $sig_warn_aft = exists $SIG{__WARN__} && defined $SIG{__WARN__} ?
> $SIG{__WARN__} : 'no exists/defined';
> -my $base_sig_warn_aft = exists $Locales::Base::SIG{__WARN__} &&
> defined $Locales::Base::SIG{__WARN__} ?
> $Locales::Base::SIG{__WARN__} : 'no exists/defined';
> +my $base_sig_warn_aft = exists $Locales::SIG{__WARN__} && defined
> $Locales::SIG{__WARN__} ? $Locales::SIG{__WARN__} : 'no exists/
> defined';
> ok($sig_warn eq $sig_warn_aft, 'main sig warn unchanged by
> lang_names_hashref()');
> ok($base_sig_warn eq $base_sig_warn_aft, 'locale::base sig warn
> unchanged by lang_names_hashref()');
>
> @@ -264,7 +264,7 @@
>
> ok($nat_hr->{'en'} eq 'English', 'array context native names
> default');
> ok($nat_hr->{'en-uk'} eq 'English (UK)', 'array context native names
> suffix');
> -ok($nat_hr->{'it'} eq 'Italian', 'array context native names
> normal');
> +ok($nat_hr->{'it'} eq 'Italiano', 'array context native names
> normal');
> ok($nat_hr->{'xxyyzz'} eq 'xxyyzz', 'array context native names
> fake');
>
> my $loadable_hr = $fr->loadable_lang_names_hashref('en-uk', 'it',
> 'xxyyzz', 'fr');
> <Utils.pm.patch.sig><Utils.pod.patch.sig><00.Locale-Maketext-
> Utils.t.patch.sig>