Skip Menu |

This queue is for tickets about the Date-Range CPAN distribution.

Report information
The Basics
Id: 72426
Status: open
Priority: 0/
Queue: Date-Range

People
Owner: Nobody in particular
Requestors: zhen.xie [...] gmail.com
Cc:
AdminCc:

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



Subject: bugs in Date::Range
Date: Mon, 14 Nov 2011 21:12:54 -0600
To: bug-Date-Range [...] rt.cpan.org
From: Zhen Xie <zhen.xie [...] gmail.com>
Range.pm sub equals { my ($self, $check) = @_; return unless UNIVERSAL::isa($check => 'Date::Range'); return $self->start == $check->start and $self->end == $check->end; } it turns that the *return $self->start == $check->start and $self->end == $check->end; *should be *return ($self->start == $check->start and $self->end == $check->end); *since seems that *return* has higher precedence than "*and*" v5.12.4 Zhen
Subject: Re: [rt.cpan.org #72426] bugs in Date::Range
Date: Tue, 15 Nov 2011 05:47:15 +0200
To: bug-Date-Range [...] rt.cpan.org
From: Tony Bowden <tony [...] tmtm.com>
On 15 November 2011 05:13, Zhen Xie via RT <bug-Date-Range@rt.cpan.org> wrote: Show quoted text
> it turns that the *return $self->start == $check->start and $self->end == > $check->end; > *should be *return ($self->start == $check->start and $self->end == > $check->end); > *since seems that *return* has higher precedence than "*and*"
Please submit a failing test case. Thanks, Tony
Subject: Re: [rt.cpan.org #72426] bugs in Date::Range
Date: Mon, 14 Nov 2011 21:55:41 -0600
To: bug-Date-Range [...] rt.cpan.org
From: Zhen Xie <zhen.xie [...] gmail.com>
!/usr/bin/perl -w use strict; use Date::Simple; use Date::Range; my $dr1 = Date::Range->new( Date::Simple->new('2011-01-01'), Date::Simple->new('2011-01-31') ); my $dr2 = Date::Range->new( Date::Simple->new('2011-01-01'), Date::Simple->new('2011-12-31') ); if($dr1->equals($dr2)){ print "failed!\n"; } else{ print "ok\n"; } On Mon, Nov 14, 2011 at 9:47 PM, tony@tmtm.com via RT < bug-Date-Range@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=72426 > > > On 15 November 2011 05:13, Zhen Xie via RT <bug-Date-Range@rt.cpan.org> > wrote:
> > it turns that the *return $self->start == $check->start and $self->end == > > $check->end; > > *should be *return ($self->start == $check->start and $self->end == > > $check->end); > > *since seems that *return* has higher precedence than "*and*"
> > Please submit a failing test case. > > Thanks, > > Tony > >
Subject: Re: [rt.cpan.org #72426] bugs in Date::Range
Date: Tue, 15 Nov 2011 06:14:51 +0200
To: bug-Date-Range [...] rt.cpan.org
From: Tony Bowden <tony [...] tmtm.com>
The uploaded file Date-Range-1.41.tar.gz has entered CPAN as file: $CPAN/authors/id/T/TM/TMTM/Date-Range-1.41.tar.gz size: 4779 bytes md5: 4ebb3e5903ba3301e6066d88788ee7a4 ---- This should solve the problem. Thanks, Tony