Tue Nov 08 20:04:53 2011bobtfish [...] bobtfish.net - Ticket created
Subject:
Moose::Autobox thoughts
Date:
Mon, 4 Jul 2011 20:01:04 +0100
To:
rjbs [...] cpan.org
From:
Tomas Doran <bobtfish [...] bobtfish.net>
I'd quite often like to be able to do:
my $foo = undef;
foreach $thing ($foo->flatten) {
}
And have the loop not execute (by returning ())..
Is this idea insane? And if not, would you take a patch?
Cheers
t0m
Wed May 09 16:14:23 2012bobtfish [...] bobtfish.net - Subject changed from 'Moose::Autobox thoughts' to 'Moose::Autobox thoughts undef->flatten = ()'
Wed May 09 16:19:01 2012bobtfish [...] bobtfish.net - Correspondence added
21:16 < rjbs> t0m: no, undef is a value
Which I do not disagree with. It flattening to an empty list would be
syntactically nice (for some problems), however on reflection is
entirely incorrect.
Wed May 09 16:19:02 2012bobtfish [...] bobtfish.net - Status changed from 'new' to 'rejected'