http://www.perlmonks.org?node_id=1061926


in reply to Re^4: Perl 5 Optimizing Compiler, Part 9: RPerl.org & The Low-Magic Perl Commandments
in thread Perl 5 Optimizing Compiler, Part 9: RPerl.org & The Low-Magic Perl Commandments

If you forbid @_ you forbid function arguments. Do you even lift, bro?

Replies are listed 'Best First'.
Re^6: Perl 5 Optimizing Compiler, Part 9: RPerl.org & The Low-Magic Perl Commandments
by Will_the_Chill (Pilgrim) on Nov 11, 2013 at 08:01 UTC
    YOU'RE RIGHT! You hereby officially win 1 brownie point for helping me figure out that the allowable exceptions for using $_ and @_ are not clearly-enough spelled out in The Low-Magic Perl Commandments. Thanks to you, 4 commandments have been updated:

    LMPC #42. Thou Shalt Use Real Prototypes (“our int__array_ref $f = sub {(my string $x, my int $y) = @_; ...}”, @_ Allowed)

    LMPC #43. Thou Shalt Not Use Perl Prototypes (AKA Parameter Context Templates)

    LMPC #52. Thou Shalt Use Lexical-Scope Grep & Map (“map { my int $var = $_; foo($var); } @{$vars};”, $_ Allowed)

    LMPC #53. Thou Shalt Not Use Dynamic-Scope Grep Or Map (“map { foo($_); } @{$vars};”, $_ Disallowed)

    I appreciate your help in tracking down that bug! :-)

    Perling,
    ~ Will the Chill