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

Re: Extend the fat comma to deal with undef

Thread Previous
From:
Sam Kington
Date:
October 7, 2016 02:35
Subject:
Re: Extend the fat comma to deal with undef
Message ID:
94C148AD-03F2-4D2C-AA94-5BDCD5683950@illuminated.co.uk
On 7 Oct 2016, at 02:24, Kent Fredric <kentfredric@gmail.com> wrote:
> 
> 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.

Ahah! That is indeed interesting and potentially useful. Thank you; I shall look at it.

Sam
-- 
Website: http://www.illuminated.co.uk/


Thread Previous


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