in reply to Re^3: A question about method return values and error checking
in thread A question about method return values and error checking

Well, the Perl 5 implementation of => has that problem. I recall discussions of enforcing scalar context when => was still fairly new, but it was already too late. Then Perl 6 made it so.

And the problems with return; from a sub that otherwise returns a single scalar go way beyond just uses of =>, of course.

- tye        

Replies are listed 'Best First'.
Re^5: A question about method return values and error checking (=>)
by LanX (Saint) on Nov 09, 2015 at 18:52 UTC
    > go way beyond just uses of =>, of course.

    Well I had the Stop Using Perl discussion in mind.

    Using fat-comma + sub-call has unpredictable consequences, mainly b/c people are led to the misinterpretation that => is pairing two values like e.g. : is doing in JS.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!