develooper Front page | perl.perl5.porters | Postings from October 2015

Re: YA smartmatch proposal [ was: Re: smartmatch needs your eyes]

Thread Previous | Thread Next
From:
Eric Brine
Date:
October 12, 2015 19:21
Subject:
Re: YA smartmatch proposal [ was: Re: smartmatch needs your eyes]
Message ID:
CALJW-qEQucDx0RMx=r6DuEKvgsdAw08RYfXttc9odgstKg6+Aw@mail.gmail.com
On Mon, Oct 12, 2015 at 1:07 PM, Abigail <abigail@abigail.be> wrote:

> This is Perl. You can't even trust the source code:
>
>
>     use constant;
>     use overload::constant integer => sub {"$_[0]"};
>
>
>     when (3) {...}   # What does this do? 'eq' or '=='?
>

If we're basing on the literal as Dave suggested, ==. I don't see a problem
with that. This would be a case of GIGO. If you do something funky, expect
funky things to happen.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About