in reply to Re^3: More intelligent warning?
in thread More intelligent warning?

Hm. Interesting idea. What else would you include?

How about disabling the use of @ARGV as the implicit target of push, pop, shift, unshift (other?) outside of a sub?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"

Replies are listed 'Best First'.
Re^5: More intelligent warning?
by chromatic (Archbishop) on Feb 05, 2010 at 18:33 UTC

    I can't believe I find myself writing this, but I use that behavior frequently and deliberately.

      An example? In one of your modules perhaps?

      And do you silence the warning?

        I used this today, in fact:

        die "$0: missing source file\n" unless @ARGV; my $infile = shift;

        This was a small filter program, not a module.

Re^5: More intelligent warning?
by LanX (Saint) on Feb 06, 2010 at 01:26 UTC
    e.g. for the flip-flop operator literal numbers mean line numbers, that hinders using flip-flop for other purposes than parsing files.

    UPDATE: And IMHO the scalar comma operator produces more unwanted results than benefits.

    In general, I think the features dropped in Perl6 are a good starting point for more ideas.

    Cheers Rolf