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

Re: Extend the fat comma to deal with undef

Thread Previous | Thread Next
David Cantrell
October 6, 2016 11:12
Re: Extend the fat comma to deal with undef
Message ID:
On Thu, Oct 06, 2016 at 05:59:28AM +0100, Sam Kington wrote:

>     mandatory(
>         this =>! this_does_something(),
>     );
> ... 
> =>! says ???we want this key-value pair???, so if the rhs returns the
> empty list you put in a scalar undef to maintain key/value parity

That clashes with ...


where =>! is a fat comma with the rhs being the logical NOT of the
results of the function.

Of course, the Lord turns his face from those who don't use whitespace,
but they do exist. For example:

> Does this make any sense?

Yes, provided some suitable syntax can be found.

David Cantrell | top google result for "internet beard fetish club"

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