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

Re: smartmatch needs your eyes

Thread Previous | Thread Next
From:
Eric Brine
Date:
October 6, 2015 18:47
Subject:
Re: smartmatch needs your eyes
Message ID:
CALJW-qEA_E9RDgN3Py+sbk_HVMPW8ExQ=wmv=1=WV-wf_o_WWg@mail.gmail.com
On Tue, Oct 6, 2015 at 12:03 PM, Dave Mitchell <davem@iabyn.com> wrote:

> If so, how does one write something functionally equivalent to when(1)
> now?
>

You need a helper that returns an object that overrides smartmatch.

when (num(1))

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