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

Re: Extend the fat comma to deal with undef

Thread Previous | Thread Next
From:
Kent Fredric
Date:
October 7, 2016 01:24
Subject:
Re: Extend the fat comma to deal with undef
Message ID:
CAATnKFDp6Spdh4X8yYWVZ9qDRacsd+-B1ze3XBFVojSyQORsRg@mail.gmail.com
On 7 October 2016 at 10:20, Sam Kington <sam@illuminated.co.uk> wrote:
> does more than just mean you don’t have to quote the lhs; it makes sure that the things you thought would be in pairs, actually were in pairs.

Have you tried PerlX::Maybe as an alternative?

https://v1.metacpan.org/pod/PerlX::Maybe

As far as I can tell, this solves all the problems you're asking for:

- Still uses left-side-quoting
- Enforces scalar context on right operand ( I think ... )
- Removes both the key and value if the value if undef

But is clever enough to not need new core functionality or more abuse
of punctuation.

-- 
Kent

KENTNL - https://metacpan.org/author/KENTNL

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