[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-datetime
Subject: Re: small DateTime optimization
From: Dave Rolsky <autarch () urth ! org>
Date: 2017-03-20 7:25:55
Message-ID: alpine.DEB.2.20.1703200225270.13583 () urth ! org
[Download RAW message or body]
On Wed, 15 Mar 2017, Flavio S. Glock wrote:
> We've been using this patch at work for years, and I just forgot to contribute it \
> back. I hope you find it worth applying.
> I believe the typical use case was:
>
> my $dt = $param || DateTime->now();
>
> In this case $param is used in boolean context, which makes a fallback call to \
> _stringify(). With the patch, "boolean" just returns true.
I committed this to master. In the future please feel free to just make a
GitHub PR.
Cheers,
Dave Rolsky
http://blog.urth.org
https://github.com/autarch
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic