Skip Menu |

This queue is for tickets about the Template-Timer CPAN distribution.

Report information
The Basics
Id: 15013
Status: resolved
Priority: 0/
Queue: Template-Timer

People
Owner: Nobody in particular
Requestors: moseley [...] hank.org
Cc:
AdminCc:

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



From: Bill Moseley <moseley [...] hank.org>
Subject: Patch for Template::Timer
Date: Tue, 11 Oct 2005 13:15:54 -0700
To: templates [...] template-toolkit.org
When calling [% PROCESS block_1 + block_2 %] the block names are passed as an array reference to process(). Template::Timer was assuming that any ref() passed was an object and calling ->name on that object. --- Timer.pm.orig 2004-10-26 09:10:10.000000000 -0700 +++ Timer.pm 2005-10-11 13:11:49.722912047 -0700 @@ -9,11 +9,11 @@ =head1 VERSION -Version 0.02 +Version 0.03 =cut -our $VERSION = '0.02'; +our $VERSION = '0.03'; =head1 SYNOPSIS @@ -63,7 +63,9 @@ my $super = __PACKAGE__->can("SUPER::$sub") or die; *$sub = sub { my $self = shift; - my $template = ref $_[0] ? $_[0]->name : $_[0]; + my $template = ref $_[0] eq 'ARRAY' + ? join( ' + ', @{$_[0]} ) + : ref $_[0] ? $_[0]->name : $_[0]; my $start = [Time::HiRes::gettimeofday]; my $data = $super->($self, @_); my $elapsed = Time::HiRes::tv_interval($start); -- Bill Moseley moseley@hank.org Show quoted text
_______________________________________________ templates mailing list templates@template-toolkit.org http://lists.template-toolkit.org/mailman/listinfo/templates
Fixed in 0.04.