Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: dwheeler [...] cpan.org
Cc:
AdminCc:

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



From: David Wheeler <dwheeler [...] cpan.org>
Subject: Weird Deaths
Date: Thu, 29 Dec 2005 21:39:35 -0800
To: bug-template-timer [...] rt.cpan.org
For some reason Template::Timer was suddenly die'ing on me at this line: my $super = __PACKAGE__->can("SUPER::$sub") or die; Shouldn't happen, right? Well, this patch fixes it, and is, I believe, more correct, to boot --- Timer.pm.old 2005-12-29 21:37:27.000000000 -0800 +++ Timer.pm 2005-12-29 21:37:31.000000000 -0800 @@ -60,7 +60,7 @@ foreach my $sub ( qw( process include ) ) { no strict; - my $super = __PACKAGE__->can("SUPER::$sub") or die; + my $super = __PACKAGE__->can($sub) or die; *$sub = sub { my $self = shift; my $template = ref $_[0] eq 'ARRAY' Thanks! David
From: CLACO [...] cpan.org
On Fri Dec 30 00:40:16 2005, DWHEELER wrote: Show quoted text
> For some reason Template::Timer was suddenly die'ing on me at this line: > > my $super = __PACKAGE__->can("SUPER::$sub") or die; > > > Shouldn't happen, right? Well, this patch fixes it, and is, I > believe, more correct, to boot > > --- Timer.pm.old 2005-12-29 21:37:27.000000000 -0800 > +++ Timer.pm 2005-12-29 21:37:31.000000000 -0800 > @@ -60,7 +60,7 @@ > foreach my $sub ( qw( process include ) ) { > no strict; > - my $super = __PACKAGE__->can("SUPER::$sub") or die; > + my $super = __PACKAGE__->can($sub) or die; > *$sub = sub { > my $self = shift; > my $template = ref $_[0] eq 'ARRAY' > > > Thanks! > > David
Well, I can give you one scenerio where it dies: C:\Mango>perl -MTest::MockObject -MTemplate::Timer -e 1 Died at C:/strawberry-perl/perl/site/lib/Template/Timer.pm line 63. Compilation failed in require. BEGIN failed--compilation aborted. This patch fixes that problem, but I'm not convinced this is really Template::Timers problem.
Subject: Re: [rt.cpan.org #16805] Weird Deaths
Date: Wed, 16 May 2007 12:47:04 -0700
To: bug-Template-Timer [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On May 16, 2007, at 09:43, via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=16805 > > > On Fri Dec 30 00:40:16 2005, DWHEELER wrote:
Dude, do you honestly expect me to remember the context of this conversation? :-) Show quoted text
> Well, I can give you one scenerio where it dies: > > C:\Mango>perl -MTest::MockObject -MTemplate::Timer -e 1 > Died at C:/strawberry-perl/perl/site/lib/Template/Timer.pm line 63. > Compilation failed in require. > BEGIN failed--compilation aborted. > > This patch fixes that problem, but I'm not convinced this is really > Template::Timers problem.
If it's a compilation problem, it's either the Template::Timer code or Perl itself. Best, David
From: ovid [...] cpan.org
On Wed May 16 12:43:05 2007, CLACO wrote: Show quoted text
> Well, I can give you one scenerio where it dies: > > C:\Mango>perl -MTest::MockObject -MTemplate::Timer -e 1 > Died at C:/strawberry-perl/perl/site/lib/Template/Timer.pm line 63. > Compilation failed in require. > BEGIN failed--compilation aborted. > > This patch fixes that problem, but I'm not convinced this is really > Template::Timers problem.
Actually, you can simplify that. It doesn't play well with UNIVERSAL::can (something which Test::MockObject uses): perl -MUNIVERSAL::can -MTemplate::Timer -e 1 Died at lib/perl5/Template/Timer.pm line 63. Compilation failed in require. BEGIN failed--compilation aborted. The patch does indeed solve this problem. I reported the bug to chromatic, but he states that this is a Template::Timer bug. I'm inclined to agree because since we're inheriting from the Template::Context package, merely saying $self->can($method) should be fine. No need to use SUPER (which should be avoided anyway do its buggy nature). Cheers, Ovid
RT-Send-CC: ovid [...] cpan.org, CLACO [...] cpan.org
Fixed in 1.01_01. Thanks!
On 2013-02-14 00:29:35, PETDANCE wrote: Show quoted text
> Fixed in 1.01_01. Thanks!
Wow, that might be the longest I've ever seen between a bug I've reported and a fix being released. :-)