develooper Front page | perl.perl5.porters | Postings from November 2017

Re: Revisiting smart match

Thread Previous | Thread Next
November 30, 2017 00:02
Re: Revisiting smart match
Message ID:
Tomasz Konojacki wrote:
>"where" and "via" are used by Moose::Util::TypeConstraints

Less critical, but still worth avoiding.

How about "because" as I proposed earlier, paired with a neologism "bewith"?

   given ($input) {
        because ($_ eq "string") { die "A" }
        because ($_ == 90210)    { die "B" }
        bewith (Number)          { die "C" }


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About