Skip Menu |

This queue is for tickets about the Time-Simple CPAN distribution.

Report information
The Basics
Id: 67558
Status: resolved
Priority: 0/
Queue: Time-Simple

People
Owner: LGODDARD [...] cpan.org
Requestors: willert [...] gmail.com
Cc:
AdminCc:

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



Subject: OO breakage in _divide and _multiply
_divide and _multiply explicitly return a Time::Simple object instead of one of the same type as $self, this makes subclassing harder. Cheers, Sebastian Willert
Thanks for taking the time to let me know. I've made refs to caller's class now, please check when you can: "File successfully copied to '/home/ftp/incoming/Time-Simple-0.06.tar.gz'"
Subject: Re: [rt.cpan.org #67558] OO breakage in _divide and _multiply
Date: Tue, 19 Apr 2011 03:20:00 +0200
To: bug-Time-Simple [...] rt.cpan.org
From: Sebastian Willert <willert [...] gmail.com>
On Mon, 2011-04-18 at 09:57 -0400, Lee Goddard via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=67558 > > > Thanks for taking the time to let me know. > > I've made refs to caller's class now, please check when you can: > > "File successfully copied to '/home/ftp/incoming/Time-Simple-0.06.tar.gz'"
Do you have a repo available? I spotted a few other rough edges and would prefer to send the fixes (or at least what I think would be) as unified diff or pull request. Cheers, Sebastian Willert
Subject: Re: [rt.cpan.org #67558] OO breakage in _divide and _multiply
Date: Tue, 19 Apr 2011 03:35:28 +0200
To: bug-Time-Simple [...] rt.cpan.org
From: Sebastian Willert <willert [...] gmail.com>
On Mon, 2011-04-18 at 09:57 -0400, Lee Goddard via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=67558 > > > Thanks for taking the time to let me know. > > I've made refs to caller's class now, please check when you can: > > "File successfully copied to '/home/ftp/incoming/Time-Simple-0.06.tar.gz'"
... and in case you are wondering on what I am working on / struggling with: https://github.com/willert/time-naive Cheers & good night, Sebastian Willert
Subject: Re: [rt.cpan.org #67558] OO breakage in _divide and _multiply
Date: Tue, 19 Apr 2011 08:44:43 +0200
To: bug-Time-Simple [...] rt.cpan.org
From: Lee Goddard <leegee [...] gmail.com>
It should have hit your local CPAN now -- let me know if it's okay, or pleas send any patches. Thanks Lee On 19/04/2011 03:20, Sebastian Willert via RT wrote: Show quoted text
> Queue: Time-Simple > Ticket<URL: http://rt.cpan.org/Ticket/Display.html?id=67558> > > On Mon, 2011-04-18 at 09:57 -0400, Lee Goddard via RT wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=67558> >> >> Thanks for taking the time to let me know. >> >> I've made refs to caller's class now, please check when you can: >> >> "File successfully copied to '/home/ftp/incoming/Time-Simple-0.06.tar.gz'"
> Do you have a repo available? I spotted a few other rough edges and > would prefer to send the fixes (or at least what I think would be) as > unified diff or pull request. > > Cheers, > Sebastian Willert > > >
Subject: Re: [rt.cpan.org #67558] OO breakage in _divide and _multiply
Date: Tue, 19 Apr 2011 08:45:00 +0200
To: bug-Time-Simple [...] rt.cpan.org
From: Lee Goddard <leegee [...] gmail.com>
Nice title, no time to read now, sorry. Goodluck. On 19/04/2011 03:35, Sebastian Willert via RT wrote: Show quoted text
> Queue: Time-Simple > Ticket<URL: http://rt.cpan.org/Ticket/Display.html?id=67558> > > On Mon, 2011-04-18 at 09:57 -0400, Lee Goddard via RT wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=67558> >> >> Thanks for taking the time to let me know. >> >> I've made refs to caller's class now, please check when you can: >> >> "File successfully copied to '/home/ftp/incoming/Time-Simple-0.06.tar.gz'"
> ... and in case you are wondering on what I am working on / struggling > with: https://github.com/willert/time-naive > > Cheers& good night, > Sebastian Willert > > >
Subject: Re: [rt.cpan.org #67558] OO breakage in _divide and _multiply
Date: Tue, 19 Apr 2011 11:45:56 +0200
To: bug-Time-Simple [...] rt.cpan.org
From: Lee Goddard <leegee [...] gmail.com>
The new version of Time::Simple replaced if ( UNIVERSAL::isa($n, 'Time::Simple')) { with if ( UNIVERSAL::isa($n, ref($self))) { On 19/04/2011 03:35, Sebastian Willert via RT wrote: Show quoted text
> Queue: Time-Simple > Ticket<URL: http://rt.cpan.org/Ticket/Display.html?id=67558> > > On Mon, 2011-04-18 at 09:57 -0400, Lee Goddard via RT wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=67558> >> >> Thanks for taking the time to let me know. >> >> I've made refs to caller's class now, please check when you can: >> >> "File successfully copied to '/home/ftp/incoming/Time-Simple-0.06.tar.gz'"
> ... and in case you are wondering on what I am working on / struggling > with: https://github.com/willert/time-naive > > Cheers& good night, > Sebastian Willert > > >
Subject: Re: [rt.cpan.org #67558] OO breakage in _divide and _multiply
Date: Tue, 19 Apr 2011 14:27:49 +0200
To: bug-Time-Simple [...] rt.cpan.org
From: Sebastian Willert <willert [...] gmail.com>
On Tue, 2011-04-19 at 05:46 -0400, lee@leegoddard.net via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=67558 > > > The new version of Time::Simple replaced > > if ( UNIVERSAL::isa($n, 'Time::Simple')) { with > > if ( UNIVERSAL::isa($n, ref($self))) {
In these places the explicit class name is actually correct (you just want to check if both pieces conform to Time::Simple. If any subclass wants to change that, its a reasonable expectation it will override the methods anyways), but should be checked this way: -- use Scalar::Util qw/blessed/; if ( blessed($n) and $n->isa('Time::Simple')) { ... } -- Sorry for the confusion I have caused and thanks for your fast response! Regards, Sebastian Willert
Subject: Re: [rt.cpan.org #67558] OO breakage in _divide and _multiply
Date: Tue, 19 Apr 2011 14:32:28 +0200
To: bug-Time-Simple [...] rt.cpan.org
From: Lee Goddard <leegee [...] gmail.com>
On 19/04/2011 14:28, Sebastian Willert via RT wrote: Show quoted text
> Queue: Time-Simple > Ticket<URL: http://rt.cpan.org/Ticket/Display.html?id=67558> > > On Tue, 2011-04-19 at 05:46 -0400, lee@leegoddard.net via RT wrote:
>> <URL: http://rt.cpan.org/Ticket/Display.html?id=67558> >> >> The new version of Time::Simple replaced >> >> if ( UNIVERSAL::isa($n, 'Time::Simple')) { with >> >> if ( UNIVERSAL::isa($n, ref($self))) {
> In these places the explicit class name is actually correct (you just > want to check if both pieces conform to Time::Simple. If any subclass > wants to change that, its a reasonable expectation it will override the > methods anyways), but should be checked this way: > > -- > use Scalar::Util qw/blessed/; > if ( blessed($n) and $n->isa('Time::Simple')) { > ... > }
The class name should never have been explicit, though, to be clean. Did you get the latest version with the other change? Any use? Any changes needed? Lee