Subject: | set_time_zone() returns undef rather than $self |
Date: | Wed, 17 Apr 2013 09:28:23 -0400 |
To: | bug-DateTime [...] rt.cpan.org |
From: | Noel Maddy <zhtwnpanta [...] gmail.com> |
As of commit 386dc80f, when set_time_zone() is called when the tz component
is an object, and the tz name matches what is being set, the method returns
undef rather than $self.
This breaks expected method-chaining behavior.
line 1959 should be:
return $self if $self->{tz}->name() eq $tz;
instead of:
return if $self->{tz}->name() eq $tz;
Thanks,
Noel