Hello community,
here is the log from the commit of package perl-Template-Toolkit for
openSUSE:Factory checked in at 2020-01-17 16:07:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Template-Toolkit (Old)
and /work/SRC/openSUSE:Factory/.perl-Template-Toolkit.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Template-Toolkit"
Fri Jan 17 16:07:21 2020 rev:36 rq:765208 version:3.006
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Template-Toolkit/perl-Template-Toolkit.changes
2020-01-14 21:13:24.750932691 +0100
+++
/work/SRC/openSUSE:Factory/.perl-Template-Toolkit.new.26092/perl-Template-Toolkit.changes
2020-01-17 16:07:47.884508477 +0100
@@ -1,0 +2,23 @@
+Fri Jan 17 03:10:19 UTC 2020 - <[email protected]>
+
+- updated to 3.006
+ see /usr/share/doc/packages/perl-Template-Toolkit/Changes
+
+ # Version 3.006 - 16th January 2020
+ #------------------------------------------------------------------------
+
+ * Fix t/date.t timezone issue introduced when adding '%z' support
+
+ #-----------------------------------------------------------------------
+ # Version 3.005 - 15th January 2020
+ #------------------------------------------------------------------------
+
+ * Add encoding option to Datafile plugin
+ * Add support for '%z' in Date plugin.
+ * Fix for WHILE_MAX which was stopping one iteration earlier.
+ * Refresh contributor list
+ * Update Copyrights for year 2020
+
+ #-----------------------------------------------------------------------
+
+-------------------------------------------------------------------
Old:
----
Template-Toolkit-3.004.tar.gz
New:
----
Template-Toolkit-3.006.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Template-Toolkit.spec ++++++
--- /var/tmp/diff_new_pack.imbI7c/_old 2020-01-17 16:07:48.240508646 +0100
+++ /var/tmp/diff_new_pack.imbI7c/_new 2020-01-17 16:07:48.244508647 +0100
@@ -17,7 +17,7 @@
Name: perl-Template-Toolkit
-Version: 3.004
+Version: 3.006
Release: 0
%define cpan_name Template-Toolkit
Summary: Template Processing System
@@ -30,8 +30,6 @@
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(AppConfig) >= 1.56
-BuildRequires: perl(CGI)
-BuildRequires: perl(Test::LeakTrace)
Requires: perl(AppConfig) >= 1.56
%{perl_requires}
++++++ Template-Toolkit-3.004.tar.gz -> Template-Toolkit-3.006.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/Changes
new/Template-Toolkit-3.006/Changes
--- old/Template-Toolkit-3.004/Changes 2020-01-13 19:13:12.000000000 +0100
+++ new/Template-Toolkit-3.006/Changes 2020-01-16 22:06:25.000000000 +0100
@@ -11,10 +11,27 @@
#========================================================================
#-----------------------------------------------------------------------
+# Version 3.006 - 16th January 2020
+#------------------------------------------------------------------------
+
+* Fix t/date.t timezone issue introduced when adding '%z' support
+
+#-----------------------------------------------------------------------
+# Version 3.005 - 15th January 2020
+#------------------------------------------------------------------------
+
+* Add encoding option to Datafile plugin
+* Add support for '%z' in Date plugin.
+* Fix for WHILE_MAX which was stopping one iteration earlier.
+* Refresh contributor list
+* Update Copyrights for year 2020
+
+#-----------------------------------------------------------------------
# Version 3.004 - 13th January 2020
#------------------------------------------------------------------------
-* Use three-args open - fixes CVE-2019-19781
+* Use three-args open - fixes CVE-2019-19781 reported by Mikhail Klyuchnikov
+from Positive Technologies.
#-----------------------------------------------------------------------
# Version 3.003 - 27th December 2019
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/HACKING
new/Template-Toolkit-3.006/HACKING
--- old/Template-Toolkit-3.004/HACKING 2019-04-29 17:52:56.000000000 +0200
+++ new/Template-Toolkit-3.006/HACKING 2020-01-16 22:04:41.000000000 +0100
@@ -1,11 +1,11 @@
Template Toolkit
- Version 2.29
+ Version 3.006
- April 2019
+ January 2020
- Copyright (C) 1996-2019 Andy Wardley. All Rights Reserved
+ Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved
This is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
@@ -48,7 +48,7 @@
COPYRIGHT
---------
-Copyright (C) 1996-2019 Andy Wardley. All Rights Reserved.
+Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
This is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/INSTALL
new/Template-Toolkit-3.006/INSTALL
--- old/Template-Toolkit-3.004/INSTALL 2019-04-29 17:52:56.000000000 +0200
+++ new/Template-Toolkit-3.006/INSTALL 2020-01-16 22:04:41.000000000 +0100
@@ -1,11 +1,11 @@
Template Toolkit
- Version 2.29
+ Version 3.006
- April 2019
+ January 2020
- Copyright (C) 1996-2019 Andy Wardley. All Rights Reserved
+ Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved
This is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
@@ -30,8 +30,8 @@
To install the Template Toolkit from the command line:
- $ tar zxf Template-Toolkit-2.29.tar.gz
- $ cd Template-Toolkit-2.29
+ $ tar zxf Template-Toolkit-3.006.tar.gz
+ $ cd Template-Toolkit-3.006
$ perl Makefile.PL
$ make
$ make test
@@ -85,19 +85,19 @@
Template-Toolkit-<version>.tar.gz
-where <version> represents the current version number, e.g. 2.29.
+where <version> represents the current version number, e.g. 3.006.
To install the Template Toolkit, unpack the distribution archive to
create an installation directory. Something like this:
- $ tar zxf Template-Toolkit-2.29.tar.gz
+ $ tar zxf Template-Toolkit-3.006.tar.gz
or
- $ gunzip Template-Toolkit-2.29.tar.gz
- $ tar xf Template-Toolkit-2.29.tar
+ $ gunzip Template-Toolkit-3.006.tar.gz
+ $ tar xf Template-Toolkit-3.006.tar
You can then 'cd' into the directory created,
- $ cd Template-Toolkit-2.29
+ $ cd Template-Toolkit-3.006
and perform the usual Perl installation procedure:
@@ -226,7 +226,7 @@
COPYRIGHT
---------
-Copyright (C) 1996-2016 Andy Wardley. All Rights Reserved.
+Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
This is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/MANIFEST
new/Template-Toolkit-3.006/MANIFEST
--- old/Template-Toolkit-3.004/MANIFEST 2020-01-13 19:14:08.000000000 +0100
+++ new/Template-Toolkit-3.006/MANIFEST 2020-01-16 22:08:45.000000000 +0100
@@ -103,6 +103,7 @@
t/context.t
t/datafile.t
t/date.t
+t/date_offset.t
t/debug.t
t/directive.t
t/directry.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/META.json
new/Template-Toolkit-3.006/META.json
--- old/Template-Toolkit-3.004/META.json 2020-01-13 19:14:08.000000000
+0100
+++ new/Template-Toolkit-3.006/META.json 2020-01-16 22:08:45.000000000
+0100
@@ -4,7 +4,7 @@
"Andy Wardley <[email protected]>"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter
version 2.150010",
+ "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter
version 2.133380",
"license" : [
"perl_5"
],
@@ -19,32 +19,6 @@
"inc"
]
},
- "prereqs" : {
- "build" : {
- "requires" : {
- "ExtUtils::MakeMaker" : "0"
- }
- },
- "configure" : {
- "requires" : {
- "ExtUtils::MakeMaker" : "0"
- }
- },
- "runtime" : {
- "requires" : {
- "AppConfig" : "1.56",
- "File::Spec" : "0.8",
- "File::Temp" : "0.12",
- "Scalar::Util" : "0"
- }
- },
- "test" : {
- "requires" : {
- "CGI" : "0",
- "Test::LeakTrace" : "0"
- }
- }
- },
"release_status" : "stable",
"resources" : {
"bugtracker" : {
@@ -57,6 +31,5 @@
"web" : "https://github.com/abw/Template2"
}
},
- "version" : "3.004",
- "x_serialization_backend" : "JSON::PP version 2.27400_02"
+ "version" : "3.006"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/META.yml
new/Template-Toolkit-3.006/META.yml
--- old/Template-Toolkit-3.004/META.yml 2020-01-13 19:14:07.000000000 +0100
+++ new/Template-Toolkit-3.006/META.yml 2020-01-16 22:08:45.000000000 +0100
@@ -2,31 +2,20 @@
abstract: 'comprehensive template processing system'
author:
- 'Andy Wardley <[email protected]>'
-build_requires:
- CGI: '0'
- ExtUtils::MakeMaker: '0'
- Test::LeakTrace: '0'
-configure_requires:
- ExtUtils::MakeMaker: '0'
+build_requires: {}
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version
2.133380'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: '1.4'
+ version: 1.4
name: Template-Toolkit
no_index:
directory:
- t
- inc
-requires:
- AppConfig: '1.56'
- File::Spec: '0.8'
- File::Temp: '0.12'
- Scalar::Util: '0'
resources:
bugtracker: https://github.com/abw/Template2/issues
homepage: http://www.template-toolkit.org
repository: https://github.com/abw/Template2.git
-version: '3.004'
-x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
+version: 3.006
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/README.md
new/Template-Toolkit-3.006/README.md
--- old/Template-Toolkit-3.004/README.md 2019-12-27 17:39:32.000000000
+0100
+++ new/Template-Toolkit-3.006/README.md 2020-01-16 22:04:41.000000000
+0100
@@ -2,11 +2,11 @@
Template Toolkit
- Version 2.29
+ Version 3.006
- April 2019
+ January 2020
- Copyright (C) 1996-2019 Andy Wardley. All Rights Reserved
+ Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved
This is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
@@ -45,6 +45,19 @@
WHAT'S NEW?
-----------
+Version 3.006 adds an encoding option to Datafile plugin
+and refresh the contributor list and copyrights for 2020.
+
+Version 3.004 fixes CVE-2019-19781 by enforcing three-args open.
+
+Version 3.003 fixes some compatibility issues with several Plugins.
+
+Version 3.002 is a maintenance release fixing a warning during install.
+
+Version 3.001 drops officialy Perl 5.6 support.
+
+Version 3.000 provides several performance improvements.
+
Version 2.29 is a maintenance release fixing a cycling weaken issue.
Version 2.28 is a maintenance release fixing some minor bugs and warnings.
@@ -349,7 +362,7 @@
COPYRIGHT
---------
-Copyright (C) 1996-2019 Andy Wardley. All Rights Reserved.
+Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
This is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Base.pm
new/Template-Toolkit-3.006/lib/Template/Base.pm
--- old/Template-Toolkit-3.004/lib/Template/Base.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Base.pm 2020-01-16
22:04:41.000000000 +0100
@@ -23,7 +23,7 @@
use warnings;
use Template::Constants;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
#------------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Config.pm
new/Template-Toolkit-3.006/lib/Template/Config.pm
--- old/Template-Toolkit-3.004/lib/Template/Config.pm 2020-01-13
19:13:59.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Config.pm 2020-01-16
22:08:44.000000000 +0100
@@ -22,7 +22,7 @@
use warnings;
use base 'Template::Base';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG;
$DEBUG = 0 unless defined $DEBUG;
@@ -35,7 +35,7 @@
our $PROVIDER = 'Template::Provider';
our $SERVICE = 'Template::Service';
our $STASH;
-$STASH = 'Template::Stash::XS';
+$STASH = 'Template::Stash';
our $CONSTANTS = 'Template::Namespace::Constants';
our $LATEX_PATH;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Constants.pm
new/Template-Toolkit-3.006/lib/Template/Constants.pm
--- old/Template-Toolkit-3.004/lib/Template/Constants.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Constants.pm 2020-01-16
22:04:41.000000000 +0100
@@ -28,7 +28,7 @@
our ( @EXPORT_OK, %EXPORT_TAGS );
our ( $DEBUG_OPTIONS, @STATUS, @ERROR, @CHOMP, @DEBUG, @ISA );
-our $VERSION = '3.004';
+our $VERSION = '3.006';
#========================================================================
# ----- EXPORTER -----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Context.pm
new/Template-Toolkit-3.006/lib/Template/Context.pm
--- old/Template-Toolkit-3.004/lib/Template/Context.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Context.pm 2020-01-16
22:04:41.000000000 +0100
@@ -35,7 +35,7 @@
use constant BADGER_EXCEPTION => 'Badger::Exception';
use constant MSWin32 => $^O eq 'MSWin32';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our $DEBUG_FORMAT = "\n## \$file line \$line : [% \$text %] ##\n";
our $VIEW_CLASS = 'Template::View';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Directive.pm
new/Template-Toolkit-3.006/lib/Template/Directive.pm
--- old/Template-Toolkit-3.004/lib/Template/Directive.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Directive.pm 2020-01-16
22:04:41.000000000 +0100
@@ -1,4 +1,4 @@
-#================================================================= -*-Perl-*-
+#================================================================= -*-Perl-*-
#
# Template::Directive
#
@@ -10,9 +10,9 @@
#
# WARNING
# Much of this module is hairy, even furry in places. It needs
-# a lot of tidying up and may even be moved into a different place
-# altogether. The generator code is often inefficient, particularly in
-# being very anal about pretty-printing the Perl code all neatly, but
+# a lot of tidying up and may even be moved into a different place
+# altogether. The generator code is often inefficient, particularly in
+# being very anal about pretty-printing the Perl code all neatly, but
# at the moment, that's still high priority for the sake of easier
# debugging.
#
@@ -32,7 +32,7 @@
use Template::Constants;
use Template::Exception;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our $WHILE_MAX = 1000 unless defined $WHILE_MAX;
our $PRETTY = 0 unless defined $PRETTY;
@@ -81,7 +81,7 @@
my \$stash = \$context->stash;
my \$output = '';
my \$_tt_error;
-
+
eval { BLOCK: {
$block
} };
@@ -110,7 +110,7 @@
$OUTPUT do {
my \$output = '';
my \$_tt_error;
-
+
eval { BLOCK: {
$block
} };
@@ -189,13 +189,13 @@
my $ns;
# Careful! Template::Parser always creates a Template::Directive object
- # (as of v2.22_1) so $self is usually an object. However, we used to
- # allow Template::Directive methods to be called as class methods and
+ # (as of v2.22_1) so $self is usually an object. However, we used to
+ # allow Template::Directive methods to be called as class methods and
# Template::Namespace::Constants module takes advantage of this fact
# by calling Template::Directive->ident() when it needs to generate an
# identifier. This hack guards against Mr Fuckup from coming to town
# when that happens.
-
+
if (ref $self) {
# trace variable usage
if ($self->{ TRACE_VARS }) {
@@ -226,7 +226,7 @@
}
}
}
-
+
if (scalar @$ident <= 2 && ! $ident->[1]) {
$ident = $ident->[0];
}
@@ -308,7 +308,7 @@
#------------------------------------------------------------------------
sub get {
- my ($self, $expr) = @_;
+ my ($self, $expr) = @_;
return "$OUTPUT $expr;";
}
@@ -318,7 +318,7 @@
#------------------------------------------------------------------------
sub call {
- my ($self, $expr) = @_;
+ my ($self, $expr) = @_;
$expr .= ';';
return $expr;
}
@@ -344,7 +344,7 @@
#------------------------------------------------------------------------
sub default {
- my ($self, $setlist) = @_;
+ my ($self, $setlist) = @_;
my $output;
while (my ($var, $val) = splice(@$setlist, 0, 2)) {
$output .= &assign($self, $var, $val, 1) . ";\n";
@@ -355,7 +355,7 @@
#------------------------------------------------------------------------
-# insert(\@nameargs) [% INSERT file %]
+# insert(\@nameargs) [% INSERT file %]
# # => [ [ $file, ... ], \@args ]
#------------------------------------------------------------------------
@@ -363,13 +363,13 @@
my ($self, $nameargs) = @_;
my ($file, $args) = @$nameargs;
$file = $self->filenames($file);
- return "$OUTPUT \$context->insert($file);";
+ return "$OUTPUT \$context->insert($file);";
}
#------------------------------------------------------------------------
-# include(\@nameargs) [% INCLUDE template foo = bar %]
-# # => [ [ $file, ... ], \@args ]
+# include(\@nameargs) [% INCLUDE template foo = bar %]
+# # => [ [ $file, ... ], \@args ]
#------------------------------------------------------------------------
sub include {
@@ -378,12 +378,12 @@
my $hash = shift @$args;
$file = $self->filenames($file);
$file .= @$hash ? ', { ' . join(', ', @$hash) . ' }' : '';
- return "$OUTPUT \$context->include($file);";
+ return "$OUTPUT \$context->include($file);";
}
#------------------------------------------------------------------------
-# process(\@nameargs) [% PROCESS template foo = bar %]
+# process(\@nameargs) [% PROCESS template foo = bar %]
# # => [ [ $file, ... ], \@args ]
#------------------------------------------------------------------------
@@ -393,7 +393,7 @@
my $hash = shift @$args;
$file = $self->filenames($file);
$file .= @$hash ? ', { ' . join(', ', @$hash) . ' }' : '';
- return "$OUTPUT \$context->process($file);";
+ return "$OUTPUT \$context->process($file);";
}
@@ -457,14 +457,14 @@
return <<EOF;
-# FOREACH
+# FOREACH
do {
my (\$_tt_value, \$_tt_error, \$_tt_oldloop);
my \$_tt_list = $list;
-
+
unless (UNIVERSAL::isa(\$_tt_list, 'Template::Iterator')) {
\$_tt_list = Template::Config->iterator(\$_tt_list)
- || die \$Template::Config::ERROR, "\\n";
+ || die \$Template::Config::ERROR, "\\n";
}
(\$_tt_value, \$_tt_error) = \$_tt_list->get_first();
@@ -502,8 +502,8 @@
#------------------------------------------------------------------------
-# wrapper(\@nameargs, $block) [% WRAPPER template foo = bar %]
-# # => [ [$file,...], \@args ]
+# wrapper(\@nameargs, $block) [% WRAPPER template foo = bar %]
+# # => [ [$file,...], \@args ]
#------------------------------------------------------------------------
sub wrapper {
@@ -528,7 +528,7 @@
$OUTPUT do {
my \$output = '';
$block
- \$context->include($file);
+ \$context->include($file);
};
EOF
}
@@ -551,7 +551,7 @@
my \$output = '';
$block
foreach ($file) {
- \$output = \$context->include(\$_$hash);
+ \$output = \$context->include(\$_$hash);
}
\$output;
};
@@ -576,11 +576,11 @@
do {
my \$_tt_failsafe = $WHILE_MAX;
$label:
- while (--\$_tt_failsafe && ($expr)) {
+ while (($expr) && --\$_tt_failsafe >= 0) {
$block
}
die "WHILE loop terminated (> $WHILE_MAX iterations)\\n"
- unless \$_tt_failsafe;
+ if \$_tt_failsafe < 0;
};
EOF
}
@@ -636,7 +636,7 @@
#------------------------------------------------------------------------
# try($block, \@catch) [% TRY %]
# ...
-# [% CATCH %]
+# [% CATCH %]
# ...
# [% END %]
#------------------------------------------------------------------------
@@ -663,8 +663,8 @@
$mblock = $catch->[1];
$mblock = pad($mblock, 1) if $PRETTY;
push(@$handlers, "'$match'");
- $catchblock .= $n++
- ? "elsif (\$_tt_handler eq '$match') {\n$mblock\n}\n"
+ $catchblock .= $n++
+ ? "elsif (\$_tt_handler eq '$match') {\n$mblock\n}\n"
: "if (\$_tt_handler eq '$match') {\n$mblock\n}\n";
}
$catchblock .= "\$_tt_error = 0;";
@@ -724,10 +724,10 @@
elsif (@$hash || @$args) {
local $" = ', ';
my $i = 0;
- $args = "$type, { args => [ "
- . join(', ', $info, @$args)
+ $args = "$type, { args => [ "
+ . join(', ', $info, @$args)
. ' ], '
- . join(', ',
+ . join(', ',
(map { "'" . $i++ . "' => $_" } ($info, @$args)),
@$hash)
. ' }';
@@ -735,7 +735,7 @@
else {
$args = "$type, $info";
}
-
+
return "\$context->throw($args, \\\$output);";
}
@@ -789,7 +789,7 @@
$alias ||= $file;
$args = &args($self, $args);
$file .= ", $args" if $args;
-# my $set = &assign($self, $alias, '$plugin');
+# my $set = &assign($self, $alias, '$plugin');
return "# USE\n"
. "\$stash->set($alias,\n"
. " \$context->plugin($file));";
@@ -918,7 +918,7 @@
if $alias;
$name .= ", $args" if $args;
$block = pad($block, 1) if $PRETTY;
-
+
return <<EOF;
# FILTER
@@ -928,7 +928,7 @@
|| \$context->throw(\$context->error);
$block
-
+
&\$_tt_filter(\$output);
};
EOF
@@ -976,7 +976,7 @@
if ($args) {
my $nargs = scalar @$args;
$args = join(', ', map { "'$_'" } @$args);
- $args = $nargs > 1
+ $args = $nargs > 1
? "\@_tt_args{ $args } = splice(\@_, 0, $nargs)"
: "\$_tt_args{ $args } = shift";
@@ -1029,7 +1029,7 @@
my $hash = shift @$args;
$args = join(', ', @$file, @$args);
$args .= @$hash ? ', { ' . join(', ', @$hash) . ' }' : '';
- return "$OUTPUT \$context->debugging($args); ## DEBUG ##";
+ return "$OUTPUT \$context->debugging($args); ## DEBUG ##";
}
@@ -1048,7 +1048,7 @@
=head1 DESCRIPTION
The C<Template::Directive> module defines a number of methods that
-generate Perl code for the runtime representation of the various
+generate Perl code for the runtime representation of the various
Template Toolkit directives.
It is used internally by the L<Template::Parser> module.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Document.pm
new/Template-Toolkit-3.006/lib/Template/Document.pm
--- old/Template-Toolkit-3.004/lib/Template/Document.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Document.pm 2020-01-16
22:04:41.000000000 +0100
@@ -26,7 +26,7 @@
use base 'Template::Base';
use Template::Constants;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our $ERROR = '';
our ($COMPERR, $AUTOLOAD, $UNICODE);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Exception.pm
new/Template-Toolkit-3.006/lib/Template/Exception.pm
--- old/Template-Toolkit-3.004/lib/Template/Exception.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Exception.pm 2020-01-16
22:04:41.000000000 +0100
@@ -26,7 +26,7 @@
use constant TEXT => 2;
use overload q|""| => "as_string", fallback => 1;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
#------------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Filters.pm
new/Template-Toolkit-3.006/lib/Template/Filters.pm
--- old/Template-Toolkit-3.004/lib/Template/Filters.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Filters.pm 2020-01-16
22:04:41.000000000 +0100
@@ -10,7 +10,7 @@
# by Leslie Michael Orchard <[email protected]>
#
# COPYRIGHT
-# Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
#
# This module is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
@@ -26,7 +26,7 @@
use Template::Constants;
use Scalar::Util 'blessed';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $AVAILABLE = { };
our $TRUNCATE_LENGTH = 32;
our $TRUNCATE_ADDON = '...';
@@ -829,7 +829,7 @@
=head1 COPYRIGHT
-Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Grammar.pm
new/Template-Toolkit-3.006/lib/Template/Grammar.pm
--- old/Template-Toolkit-3.004/lib/Template/Grammar.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Grammar.pm 2020-01-16
22:04:41.000000000 +0100
@@ -10,7 +10,7 @@
# Andy Wardley <[email protected]>
#
# COPYRIGHT
-# Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
# Copyright (C) 1998-2000 Canon Research Centre Europe Ltd.
#
# This module is free software; you can redistribute it and/or
@@ -30,7 +30,7 @@
use strict;
use warnings;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
my (@RESERVED, %CMPOP, $LEXTABLE, $RULES, $STATES);
my ($factory, $rawstart);
@@ -6221,7 +6221,7 @@
=head1 COPYRIGHT
-Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Iterator.pm
new/Template-Toolkit-3.006/lib/Template/Iterator.pm
--- old/Template-Toolkit-3.004/lib/Template/Iterator.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Iterator.pm 2020-01-16
22:04:41.000000000 +0100
@@ -31,7 +31,7 @@
use constant ODD => 'odd';
use constant EVEN => 'even';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our $AUTOLOAD;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Template-Toolkit-3.004/lib/Template/Manual/Config.pod
new/Template-Toolkit-3.006/lib/Template/Manual/Config.pod
--- old/Template-Toolkit-3.004/lib/Template/Manual/Config.pod 2020-01-13
19:12:53.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Manual/Config.pod 2020-01-15
18:21:55.000000000 +0100
@@ -6,7 +6,7 @@
# Andy Wardley <[email protected]>
#
# COPYRIGHT
-# Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
#
# This module is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Template-Toolkit-3.004/lib/Template/Manual/Credits.pod
new/Template-Toolkit-3.006/lib/Template/Manual/Credits.pod
--- old/Template-Toolkit-3.004/lib/Template/Manual/Credits.pod 2018-10-05
23:06:30.000000000 +0200
+++ new/Template-Toolkit-3.006/lib/Template/Manual/Credits.pod 2020-01-15
18:43:22.000000000 +0100
@@ -6,7 +6,7 @@
# Andy Wardley <[email protected]>
#
# COPYRIGHT
-# Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
#
# This module is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
@@ -64,7 +64,7 @@
=head1 COPYRIGHT
-Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
The Template Toolkit is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
@@ -78,23 +78,29 @@
If you submit a patch/pull request then please make sure you add your
own name to this list and include it in the changes.
-Amiri Barksdale, Thierry-Michel Barral, Craig Barratt, Stas Bekman, Robin
Berjon,
-Tony Bowden, Neil Bowers, Leon Brocard, Lyle Brooks, Norbert Buchmüller,
-Dave Cash, Piers Cawley, Darren Chamberlain, Timmy Chan, Eric Cholet,
Chromatic,
-Nik Clayton, Tosh Cooey, Dave Cross, Chris Dean, Francois Desarmenien, Horst
Dumcke,
-Mark Fowler, Michael Fowler, Brian Fraser, Kenny Gatdula, Axel Gerstmair, Jay
Hannah, Dylan
-William Hardison, Perrin Harkins, Bryce Harrington, Dave Hodgkinson, Lubomir
-Host, Dave Howorth, Jon Jensen, Harald Joerg, Colin Johnson, Colin Keith,
-Adam Kennedy, Vivek Khera, Alexey A. Kiritchun, Rafael Kitover, Andreas
-Koenig, Ivan Kurmanov, Denis F. Latypoff, Hans von Lengerke, Jonas Liljegren,
-Simon Napiorkowski, Breno G. de Oliveira, Leslie Michael Orchard, Paul Orrock,
-Jonathon Padfield, Steve Peters, Briac PilprE<eacute>, Yuri Pimenov, Martin
-Portman, Marc Remy, Slaven Rezic, Jess Robinson, Josh Rosenbaum, Christian
-Schaffner, Mike Schilli, Randal L. Schwartz, Paul Seamons, Paul Sharpe,
-Ricardo Signes, Ville SkyttE<auml>, Barrie Slaymaker, David Steinbrunner, Doug
-Steinwand, Michael Stevens, Autrijus Tang, Drew Taylor, Rod Taylor, Swen
-Thuemmler, Richard Tietjen, Ben Tilly, Stathy G. Touloumis, Jim Vaughan, Simon
-Wilcox, Chris Winters.
+Adam Kennedy, ahollandECS, Alexey A. Kiritchun, Amiri Barksdale, Andreas
Koenig,
+Andy Wardley, Autrijus Tang, Axel Gerstmair, Barrie Slaymaker, Ben Tilly,
+Breno G. de Oliveira, Briac PilprE<eacute>, Brian Fraser, Brian Wightman,
+Bryce Harrington, Chris Dean, Chris Winters, Christian, chromatic, Colin
Johnson,
+Colin Keith, Craig Barratt, Darren Chamberlain, Dave Cash, Dave Cross, Dave
Hodgkinson,
+Dave Howorth, Dave Jacoby, David Steinbrunner, Denis F. Latypoff, Dennis Clark,
+Doug, Drew Taylor, Dylan, E. Choroba, eadjei, Eric Cholet, Francois
Desarmenien,
+François Andriot, fREW Schmidt, gordon-fish, Guido Flohr, Hans von Lengerke,
+Harald Joerg, Horst Dumcke, Ivan Krylov, Ivan Kurmanov, Jacques Germishuys,
+Jason Lewis, Jay Hannah, Jens Rehsack, Jess Robinson, Jim Vaughan, John
Lightsey,
+John Napiorkowski, Jon Jensen, Jonas Liljegren, Jonathon Padfield, José
Joaquín Atria,
+Jose Luis Martinez, Josh Rosenbaum, Kenny Gatdula, Kent Fredric, Kevin M.
Goess, Koenig,
+Leon Brocard, Leslie Michael Orchard, Lubomir, Lyle Brooks, Marc Remy, Mark
Fowler,
+Martin, Matthew Somerville, Michael Fowler, Michael Stevens, Mike Schilli,
+Mikhail Klyuchnikov from Positive Technologies, nataraj, Neil Bowers, Nick
Hibma,
+Nicolas R, Nik Clayton, Norbert Buchmüller, Paul Orrock, Paul Seamons, Paul
Sharpe,
+Perrin Harkins, Philippe Bruhat (BooK), Piers Cawley, Portman, Rafael Kitover,
+Randal L. Schwartz, Ricardo Signes, Richard Tietjen, Robin Berjon, Rod Taylor,
Schaffner,
+sdeseille, Sean McAfee, Sean Zellmer, Simon, Simon Dawson, Simon Matthews,
Simon Napiorkowski,
+Slaven Rezic, Smylers, Stas Bekman, Stathy G. Touloumis, stefano-b, Steinwand,
+Steve Peters, Swen, Thierry-Michel Barral, Thuemmler, Timmy Chan, Todd
Rinaldo, Tom Delmas,
+Tony Bowden, Tosh Cooey, Ville SkyttE<auml>, Vivek Khera, Wilcox, William
Hardison,
+Yanick Champoux, Yuri Pimenov.
=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Manual/Intro.pod
new/Template-Toolkit-3.006/lib/Template/Manual/Intro.pod
--- old/Template-Toolkit-3.004/lib/Template/Manual/Intro.pod 2018-10-05
23:06:30.000000000 +0200
+++ new/Template-Toolkit-3.006/lib/Template/Manual/Intro.pod 2020-01-15
18:21:55.000000000 +0100
@@ -6,7 +6,7 @@
# Andy Wardley <[email protected]>
#
# COPYRIGHT
-# Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
#
# This module is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Template-Toolkit-3.004/lib/Template/Namespace/Constants.pm
new/Template-Toolkit-3.006/lib/Template/Namespace/Constants.pm
--- old/Template-Toolkit-3.004/lib/Template/Namespace/Constants.pm
2020-01-13 19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Namespace/Constants.pm
2020-01-16 22:04:41.000000000 +0100
@@ -26,7 +26,7 @@
use Template::Directive;
use Template::Exception;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Parser.pm
new/Template-Toolkit-3.006/lib/Template/Parser.pm
--- old/Template-Toolkit-3.004/lib/Template/Parser.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Parser.pm 2020-01-16
22:04:41.000000000 +0100
@@ -46,7 +46,7 @@
use constant ERROR => 2;
use constant ABORT => 3;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our $ERROR = '';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/Assert.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Assert.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Assert.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Assert.pm 2020-01-16
22:04:41.000000000 +0100
@@ -23,7 +23,7 @@
use warnings;
use Template::Exception;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $MONAD = 'Template::Monad::Assert';
our $EXCEPTION = 'Template::Exception';
our $AUTOLOAD;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/CGI.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/CGI.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/CGI.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/CGI.pm 2020-01-16
22:04:41.000000000 +0100
@@ -23,7 +23,7 @@
use base 'Template::Plugin';
use CGI;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
sub new {
my $class = shift;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Template-Toolkit-3.004/lib/Template/Plugin/Datafile.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Datafile.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Datafile.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Datafile.pm 2020-01-16
22:04:42.000000000 +0100
@@ -23,11 +23,11 @@
use warnings;
use base 'Template::Plugin';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
sub new {
my ($class, $context, $filename, $params) = @_;
- my ($delim, $line, @fields, @data, @results);
+ my ($delim, $encoding, $line, @fields, @data, @results);
my $self = [ ];
local *FD;
local $/ = "\n";
@@ -35,11 +35,12 @@
$params ||= { };
$delim = $params->{'delim'} || ':';
$delim = quotemeta($delim);
+ $encoding = defined $params->{'encoding'} ?
':encoding('.$params->{'encoding'}.')' : '';
return $class->error("No filename specified")
unless $filename;
- open(FD, '<', $filename)
+ open(FD, '<'.$encoding, $filename)
|| return $class->error("$filename: $!");
# first line of file should contain field definitions
@@ -92,6 +93,7 @@
[% USE mydata = datafile('/path/to/datafile') %]
[% USE mydata = datafile('/path/to/datafile', delim = '|') %]
+ [% USE mydata = datafile('/path/to/datafile', encoding = 'UTF-8') %]
[% FOREACH record = mydata %]
[% record.this %] [% record.that %]
@@ -109,6 +111,8 @@
least - in a future version it might also use the C<INCLUDE_PATH>). An
optional C<delim> parameter may also be provided to specify an alternate
delimiter character.
+The optional C<encoding> parameter may be used to specify the input file
+encoding.
[% USE userlist = datafile('/path/to/file/users') %]
[% USE things = datafile('items', delim = '|') %]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/Date.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Date.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Date.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Date.pm 2020-01-16
22:04:42.000000000 +0100
@@ -30,7 +30,7 @@
use constant HAS_SETLOCALE => $Config::Config{d_setlocale};
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $FORMAT = '%H:%M:%S %d-%b-%Y'; # default strftime() format
our @LOCALE_SUFFIX = qw( .ISO8859-1 .ISO_8859-15 .US-ASCII .UTF-8 );
@@ -88,15 +88,17 @@
: ($params->{ locale } || $self->{ locale });
my $gmt = @_ ? shift(@_)
: ($params->{ gmt } || $self->{ gmt });
+ my $offset = @_ ? shift(@_)
+ : ( $params->{ use_offset } || $self->{ use_offset });
my (@date, $datestr);
if ($time =~ /^-?\d+$/) {
# $time is now in seconds since epoch
if ($gmt) {
- @date = (gmtime($time))[0..6];
+ @date = (gmtime($time))[ 0 .. ( $offset ? 6 : 8 ) ];
}
else {
- @date = (localtime($time))[0..6];
+ @date = (localtime($time))[ 0 .. ( $offset ? 6 : 8 ) ];
}
}
else {
@@ -125,6 +127,11 @@
$date[4] -= 1; # correct month number 1-12 to range 0-11
$date[5] -= 1900; # convert absolute year to years since 1900
$time = &POSIX::mktime(@date);
+
+ if ($offset) {
+ push @date, $gmt
+ ? (gmtime($time))[6..8] : (localtime($time))[6..8];
+ }
}
if ($locale) {
@@ -245,10 +252,11 @@
# named parameters
[% date.format(mytime, format = '%H:%M:%S') %]
[% date.format(locale = 'en_GB') %]
- [% date.format(time = date.now,
- format = '%H:%M:%S',
- locale = 'en_GB) %]
-
+ [% date.format(time = date.now,
+ format = '%H:%M:%S',
+ locale = 'en_GB'
+ use_offset = 1) %]
+
# specify default format to plugin
[% USE date(format = '%H:%M:%S', locale = 'de_DE') %]
@@ -316,6 +324,11 @@
'C<%Z>' (time zone) in the format parameter will lead to an extremely
misleading result.
+To maintain backwards compatibility, using the C<%z> placeholder in the format
+string (to output the UTC offset) currently requires the C<use_offset>
+parameter to be set to a true value. This can also be passed as the fifth
+parameter to format (but the former will probably be clearer).
+
Any or all of these parameters may be named. Positional parameters
should always be in the order C<($time, $format, $locale)>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Template-Toolkit-3.004/lib/Template/Plugin/Directory.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Directory.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Directory.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Directory.pm 2020-01-16
22:04:42.000000000 +0100
@@ -26,7 +26,7 @@
use Template::Plugin::File;
use base 'Template::Plugin::File';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
#------------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/Dumper.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Dumper.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Dumper.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Dumper.pm 2020-01-16
22:04:42.000000000 +0100
@@ -24,7 +24,7 @@
use base 'Template::Plugin';
use Data::Dumper;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our @DUMPER_ARGS = qw( Indent Pad Varname Purity Useqq Terse Freezer
Toaster Deepcopy Quotekeys Bless Maxdepth Sortkeys );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/File.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/File.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/File.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/File.pm 2020-01-16
22:04:42.000000000 +0100
@@ -28,7 +28,7 @@
use File::Basename;
use base 'Template::Plugin';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our @STAT_KEYS = qw( dev ino mode nlink uid gid rdev size
atime mtime ctime blksize blocks );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/Filter.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Filter.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Filter.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Filter.pm 2020-01-16
22:04:42.000000000 +0100
@@ -26,7 +26,7 @@
use Scalar::Util 'weaken', 'isweak';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DYNAMIC = 0 unless defined $DYNAMIC;
@@ -386,7 +386,7 @@
=head1 COPYRIGHT
-Copyright (C) 1996-2019 Andy Wardley. All Rights Reserved.
+Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/Format.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Format.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Format.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Format.pm 2020-01-16
22:04:42.000000000 +0100
@@ -23,7 +23,7 @@
use warnings;
use base 'Template::Plugin';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
sub new {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/HTML.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/HTML.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/HTML.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/HTML.pm 2020-01-16
22:04:42.000000000 +0100
@@ -23,7 +23,7 @@
use warnings;
use base 'Template::Plugin';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
sub new {
my ($class, $context, @args) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/Image.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Image.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Image.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Image.pm 2020-01-16
22:04:42.000000000 +0100
@@ -22,7 +22,7 @@
use Template::Exception;
use File::Spec;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $AUTOLOAD;
BEGIN {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Template-Toolkit-3.004/lib/Template/Plugin/Iterator.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Iterator.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Iterator.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Iterator.pm 2020-01-16
22:04:42.000000000 +0100
@@ -25,7 +25,7 @@
use base 'Template::Plugin';
use Template::Iterator;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
#------------------------------------------------------------------------
# new($context, \@data, \%args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/Math.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Math.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Math.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Math.pm 2020-01-16
22:04:42.000000000 +0100
@@ -22,7 +22,7 @@
use warnings;
use base 'Template::Plugin';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $AUTOLOAD;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/Pod.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Pod.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Pod.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Pod.pm 2020-01-16
22:04:42.000000000 +0100
@@ -24,7 +24,7 @@
use Pod::POM;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
#------------------------------------------------------------------------
# new($context, \%config)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Template-Toolkit-3.004/lib/Template/Plugin/Procedural.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Procedural.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Procedural.pm
2020-01-13 19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Procedural.pm
2020-01-16 22:04:42.000000000 +0100
@@ -22,7 +22,7 @@
use warnings;
use base 'Template::Plugin';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our $AUTOLOAD;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/Scalar.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Scalar.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Scalar.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Scalar.pm 2020-01-16
22:04:42.000000000 +0100
@@ -24,7 +24,7 @@
use Template::Exception;
use Scalar::Util qw();
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $MONAD = 'Template::Monad::Scalar';
our $EXCEPTION = 'Template::Exception';
our $AUTOLOAD;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/String.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/String.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/String.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/String.pm 2020-01-16
22:04:42.000000000 +0100
@@ -26,7 +26,7 @@
use overload q|""| => "text",
fallback => 1;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $ERROR = '';
*centre = \*center;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/Table.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Table.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Table.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Table.pm 2020-01-16
22:04:42.000000000 +0100
@@ -24,7 +24,7 @@
use base 'Template::Plugin';
use Scalar::Util 'blessed';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $AUTOLOAD;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/URL.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/URL.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/URL.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/URL.pm 2020-01-16
22:04:42.000000000 +0100
@@ -23,7 +23,7 @@
use warnings;
use base 'Template::Plugin';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $JOINT = '&';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/View.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/View.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/View.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/View.pm 2020-01-16
22:04:42.000000000 +0100
@@ -23,7 +23,7 @@
use warnings;
use base 'Template::Plugin';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
use Template::View;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin/Wrap.pm
new/Template-Toolkit-3.006/lib/Template/Plugin/Wrap.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin/Wrap.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin/Wrap.pm 2020-01-16
22:04:42.000000000 +0100
@@ -23,7 +23,7 @@
use base 'Template::Plugin';
use Text::Wrap;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
sub new {
my ($class, $context, $format) = @_;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugin.pm
new/Template-Toolkit-3.006/lib/Template/Plugin.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugin.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugin.pm 2020-01-16
22:04:41.000000000 +0100
@@ -24,7 +24,7 @@
use warnings;
use base 'Template::Base';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our $ERROR = '';
our $AUTOLOAD;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Plugins.pm
new/Template-Toolkit-3.006/lib/Template/Plugins.pm
--- old/Template-Toolkit-3.004/lib/Template/Plugins.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Plugins.pm 2020-01-16
22:04:42.000000000 +0100
@@ -28,7 +28,7 @@
use base 'Template::Base';
use Template::Constants;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our $PLUGIN_BASE = 'Template::Plugin';
our $STD_PLUGINS = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Provider.pm
new/Template-Toolkit-3.006/lib/Template/Provider.pm
--- old/Template-Toolkit-3.004/lib/Template/Provider.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Provider.pm 2020-01-16
22:04:42.000000000 +0100
@@ -55,7 +55,7 @@
use constant STAT => 5; # Time last stat()ed
use constant MSWin32 => $^O eq 'MSWin32';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our $ERROR = '';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Service.pm
new/Template-Toolkit-3.006/lib/Template/Service.pm
--- old/Template-Toolkit-3.004/lib/Template/Service.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Service.pm 2020-01-16
22:04:42.000000000 +0100
@@ -30,7 +30,7 @@
use constant EXCEPTION => 'Template::Exception';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our $ERROR = '';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Stash/Context.pm
new/Template-Toolkit-3.006/lib/Template/Stash/Context.pm
--- old/Template-Toolkit-3.004/lib/Template/Stash/Context.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Stash/Context.pm 2020-01-16
22:04:42.000000000 +0100
@@ -71,7 +71,7 @@
use warnings;
use base 'Template::Stash';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Stash.pm
new/Template-Toolkit-3.006/lib/Template/Stash.pm
--- old/Template-Toolkit-3.004/lib/Template/Stash.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Stash.pm 2020-01-16
22:04:42.000000000 +0100
@@ -25,7 +25,7 @@
use Template::Exception;
use Scalar::Util qw( blessed reftype );
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our $PRIVATE = qr/^[_.]/;
our $UNDEF_TYPE = 'var.undef';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/Test.pm
new/Template-Toolkit-3.006/lib/Template/Test.pm
--- old/Template-Toolkit-3.004/lib/Template/Test.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/Test.pm 2020-01-16
22:04:42.000000000 +0100
@@ -28,7 +28,7 @@
use constant MSWin32 => $^O eq 'MSWin32';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0;
our @ISA = qw( Exporter );
our @EXPORT = qw( ntests ok is match flush skip_all test_expect callsign
banner );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/VMethods.pm
new/Template-Toolkit-3.006/lib/Template/VMethods.pm
--- old/Template-Toolkit-3.004/lib/Template/VMethods.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/VMethods.pm 2020-01-16
22:04:42.000000000 +0100
@@ -27,7 +27,7 @@
use Template::Filters;
require Template::Stash;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our $PRIVATE = $Template::Stash::PRIVATE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template/View.pm
new/Template-Toolkit-3.006/lib/Template/View.pm
--- old/Template-Toolkit-3.004/lib/Template/View.pm 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/lib/Template/View.pm 2020-01-16
22:04:42.000000000 +0100
@@ -29,7 +29,7 @@
use warnings;
use base 'Template::Base';
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $DEBUG = 0 unless defined $DEBUG;
our @BASEARGS = qw( context );
our $AUTOLOAD;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/lib/Template.pm
new/Template-Toolkit-3.006/lib/Template.pm
--- old/Template-Toolkit-3.004/lib/Template.pm 2020-01-13 19:13:07.000000000
+0100
+++ new/Template-Toolkit-3.006/lib/Template.pm 2020-01-16 22:04:41.000000000
+0100
@@ -10,7 +10,7 @@
# Andy Wardley <[email protected]>
#
# COPYRIGHT
-# Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
#
# This module is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
@@ -32,7 +32,7 @@
use File::Path;
use Scalar::Util qw(blessed);
-our $VERSION = '3.004';
+our $VERSION = '3.006';
our $ERROR = '';
our $DEBUG = 0;
our $BINMODE = 0 unless defined $BINMODE;
@@ -919,7 +919,7 @@
=head1 COPYRIGHT
-Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/parser/Grammar.pm.skel
new/Template-Toolkit-3.006/parser/Grammar.pm.skel
--- old/Template-Toolkit-3.004/parser/Grammar.pm.skel 2020-01-13
19:13:07.000000000 +0100
+++ new/Template-Toolkit-3.006/parser/Grammar.pm.skel 2020-01-16
22:04:42.000000000 +0100
@@ -10,7 +10,7 @@
# Andy Wardley <[email protected]>
#
# COPYRIGHT
-# Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
# Copyright (C) 1998-2000 Canon Research Centre Europe Ltd.
#
# This module is free software; you can redistribute it and/or
@@ -30,7 +30,7 @@
use strict;
use warnings;
-our $VERSION = '3.004';
+our $VERSION = '3.006';
my (@RESERVED, %CMPOP, $LEXTABLE, $RULES, $STATES);
my ($factory, $rawstart);
@@ -178,7 +178,7 @@
=head1 COPYRIGHT
-Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/t/anycase.t
new/Template-Toolkit-3.006/t/anycase.t
--- old/Template-Toolkit-3.004/t/anycase.t 2018-10-09 20:57:08.000000000
+0200
+++ new/Template-Toolkit-3.006/t/anycase.t 2020-01-15 18:21:55.000000000
+0100
@@ -20,7 +20,7 @@
#
# Written by Andy Wardley <[email protected]>
#
-# Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
# Copyright (C) 1998-2000 Canon Research Centre Europe Ltd.
#
# This is free software; you can redistribute it and/or modify it
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/t/date.t
new/Template-Toolkit-3.006/t/date.t
--- old/Template-Toolkit-3.004/t/date.t 2019-12-23 23:18:41.129671582 +0100
+++ new/Template-Toolkit-3.006/t/date.t 2020-01-16 22:04:26.000000000 +0100
@@ -29,7 +29,6 @@
my $got_date_calc = 0;
$got_date_calc++ unless $@;
-
$Template::Test::DEBUG = 0;
my $format = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/t/date_offset.t
new/Template-Toolkit-3.006/t/date_offset.t
--- old/Template-Toolkit-3.004/t/date_offset.t 1970-01-01 01:00:00.000000000
+0100
+++ new/Template-Toolkit-3.006/t/date_offset.t 2020-01-16 22:04:26.000000000
+0100
@@ -0,0 +1,107 @@
+#============================================================= -*-perl-*-
+#
+# t/date_offset.t
+#
+# Tests the 'Date' plugin.
+#
+# Written by Andy Wardley <[email protected]>
+#
+# Copyright (C) 2000 Andy Wardley. All Rights Reserved.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the same terms as Perl itself.
+#
+# $Id$
+#
+#========================================================================
+
+use strict;
+use lib qw( ./lib ../lib );
+use Template;
+use Template::Test;
+use Template::Plugin::Date;
+use POSIX;
+use Config;
+$^W = 1;
+
+eval "use Date::Calc";
+
+my $got_date_calc = 0;
+$got_date_calc++ unless $@;
+
+local $ENV{TZ} = 'GMT';
+#local $ENV{TZ} = 'Europe/London';
+
+skip_all('TZ GMT not showing as +0000') unless check_tz();
+
+sub check_tz {
+ # '2001/09/30T12:59:00' used in DATA
+ my $date = [
+ '00',
+ '59',
+ '12',
+ '30',
+ 8,
+ 101
+ ];
+
+ my $time = POSIX::mktime(@$date);
+ push @$date, (localtime($time))[6..8];
+ my $tz = POSIX::strftime("%z", @$date);
+
+ return $tz eq '+0000';
+}
+
+$Template::Test::DEBUG = 0;
+
+my $format = {
+ 'default' => $Template::Plugin::Date::FORMAT,
+ 'time' => '%H:%M:%S',
+ 'date' => '%d-%b-%Y',
+ 'timeday' => 'the time is %H:%M:%S on %A',
+};
+
+my $time = time;
+my @ltime = localtime($time);
+
+my $params = {
+ time => $time,
+ format => $format,
+ now => sub {
+ &POSIX::strftime(shift || $format->{ default }, localtime(time));
+ },
+ date_calc => $got_date_calc,
+};
+
+# force second to rollover so that we reliably see any tests failing.
+# lesson learnt from 2.07b where I broke the Date plugin's handling of a
+# 'time' parameter, but which didn't immediately come to light because the
+# script could run before the second rolled over and not expose the bug
+
+sleep 1;
+
+test_expect(\*DATA, { POST_CHOMP => 1 }, $params);
+
+
+
+__DATA__
+-- test --
+[% USE date( use_offset = 1 );
+ date.format( '2001/09/30T12:59:00', '%H:%M %z' )
+-%]
+-- expect --
+12:59 +0000
+
+-- test --
+[% USE date( use_offset = 1 );
+ date.format( '2001/09/30T12:59:00', '%H:%M' )
+-%]
+-- expect --
+12:59
+
+-- test --
+[% USE date;
+ date.format( time = '2001/09/30T12:59:00', format = '%H:%M %z', use_offset
= 1 )
+-%]
+-- expect --
+12:59 +0000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/t/filter.t
new/Template-Toolkit-3.006/t/filter.t
--- old/Template-Toolkit-3.004/t/filter.t 2018-10-09 20:57:08.000000000
+0200
+++ new/Template-Toolkit-3.006/t/filter.t 2020-01-15 18:21:55.000000000
+0100
@@ -6,7 +6,7 @@
#
# Written by Andy Wardley <[email protected]>
#
-# Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
# Copyright (C) 1998-2000 Canon Research Centre Europe Ltd.
#
# This is free software; you can redistribute it and/or modify it
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/t/outline.t
new/Template-Toolkit-3.006/t/outline.t
--- old/Template-Toolkit-3.004/t/outline.t 2018-10-09 20:57:09.000000000
+0200
+++ new/Template-Toolkit-3.006/t/outline.t 2020-01-15 18:21:55.000000000
+0100
@@ -6,7 +6,7 @@
#
# Written by Andy Wardley <[email protected]>
#
-# Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
# Copyright (C) 1998-2000 Canon Research Centre Europe Ltd.
#
# This is free software; you can redistribute it and/or modify it
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/t/while.t
new/Template-Toolkit-3.006/t/while.t
--- old/Template-Toolkit-3.004/t/while.t 2018-10-09 20:57:09.000000000
+0200
+++ new/Template-Toolkit-3.006/t/while.t 2020-01-15 18:42:28.000000000
+0100
@@ -28,7 +28,7 @@
$Template::Directive::WHILE_MAX = 100;
my $config = {
- INTERPOLATE => 1,
+ INTERPOLATE => 1,
POST_CHOMP => 1,
};
@@ -110,7 +110,7 @@
error: [% error.info %]
[% END %]
-- expect --
-...................................................................................................
+....................................................................................................
error: WHILE loop terminated (> 100 iterations)
@@ -125,7 +125,7 @@
* x-ray
* zulu
-- test --
-[%
+[%
i = 1;
WHILE i <= 10;
SWITCH i;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Template-Toolkit-3.004/t/zz-plugin-leak.t
new/Template-Toolkit-3.006/t/zz-plugin-leak.t
--- old/Template-Toolkit-3.004/t/zz-plugin-leak.t 2018-10-09
20:57:09.000000000 +0200
+++ new/Template-Toolkit-3.006/t/zz-plugin-leak.t 2020-01-15
18:21:55.000000000 +0100
@@ -6,7 +6,7 @@
#
# Written by Andy Wardley <[email protected]>
#
-# Copyright (C) 1996-2014 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2020 Andy Wardley. All Rights Reserved.
# Copyright (C) 1998-2000 Canon Research Centre Europe Ltd.
#
# This is free software; you can redistribute it and/or modify it