in reply to Re^2: A question about method return values and error checking
in thread A question about method return values and error checking
That's because the design of => is flawed.
It should enforce scalar context, if people want to use it as a pairing operator.
DB<106> sub tst { return } DB<107> x a => scalar( tst() ), b=>2 => ("a", undef, "b", 2)
And yes I know that Moose relies on this "feature", but you can't have it all.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: A question about method return values and error checking (=>)
by tye (Sage) on Nov 09, 2015 at 18:09 UTC | |
by LanX (Saint) on Nov 09, 2015 at 18:52 UTC |