At Fri, 16 Aug 2002 08:26:14 +0100,
Andy Wardley wrote:
>
> Ah yes. I applied a patch to the Date plugin which does a better job
> of finding locale files than it did before. I hadn't updated the test
> to do the same.
>
> The patch below should fix it (committed to CVS), but it's nothing
> to worry about for now. It's a broken test, not a broken tookit. :-)
This patch removes "undefine variable" warnings in Perl 5.005_03 w/
FreeBSD 4.4.
--
Tatsuhiko Miyagawa <[EMAIL PROTECTED]>
Index: t/date.t
===================================================================
RCS file: /template-toolkit/Template2/t/date.t,v
retrieving revision 2.8
diff -u -r2.8 date.t
--- t/date.t 2002/08/16 07:19:26 2.8
+++ t/date.t 2002/08/16 08:01:02
@@ -57,7 +57,8 @@
# some systems expect locales to have a particular suffix
for my $suffix ('', @Template::Plugin::Date::LOCALE_SUFFIX) {
my $try_locale = $locale.$suffix;
- if ($try_locale eq &POSIX::setlocale(&POSIX::LC_ALL, $try_locale)) {
+ my $setlocale = &POSIX::setlocale(&POSIX::LC_ALL, $try_locale);
+ if (defined $setlocale && $try_locale eq $setlocale) {
$locale = $try_locale;
last;
}
Index: lib/Template/Plugin/Date.pm
===================================================================
RCS file: /template-toolkit/Template2/lib/Template/Plugin/Date.pm,v
retrieving revision 2.58
diff -u -r2.58 Date.pm
--- lib/Template/Plugin/Date.pm 2002/08/15 16:42:15 2.58
+++ lib/Template/Plugin/Date.pm 2002/08/16 08:01:03
@@ -117,7 +117,9 @@
# some systems expect locales to have a particular suffix
for my $suffix ('', @LOCALE_SUFFIX) {
my $try_locale = $locale.$suffix;
- if ($try_locale eq &POSIX::setlocale(&POSIX::LC_ALL, $try_locale)) {
+ use Data::Dumper;
+ my $setlocale = &POSIX::setlocale(&POSIX::LC_ALL, $try_locale);
+ if (defined $setlocale && $try_locale eq $setlocale) {
$locale = $try_locale;
last;
}
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://www.template-toolkit.org/mailman/listinfo/templates