Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: rob.kinyon [...] gmail.com
Cc:
AdminCc:

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



Subject: PROCESS blocks that have more than one file
If you have a process block that has more than one file, Template::Timer crashes. For example: [% PROCESS includes/foo + includes/bar %] A minimalist fix would be: --- /usr/lib/perl5/site_perl/5.8.6/Template/Timer.pm 2004-10-26 12:10:10.000000000 -0400 +++ Template/Timer.pm 2005-06-22 10:41:16.000000000 -0400 @@ -63,7 +63,7 @@ my $super = __PACKAGE__->can("SUPER::$sub") or die; *$sub = sub { my $self = shift; - my $template = ref $_[0] ? $_[0]->name : $_[0]; + my $template = ref $_[0] && ref $_[0] ne 'ARRAY' ? $_[0]->name : $_[0]; my $start = [Time::HiRes::gettimeofday]; my $data = $super->($self, @_); my $elapsed = Time::HiRes::tv_interval($start); But, I'm not happy with that. It's unclear what the best thing to do here would be, but at least this doesn't crash on my tests.
Fixed by #58523.