in reply to Re^6: More intelligent warning?
in thread More intelligent 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.

Replies are listed 'Best First'.
Re^8: More intelligent warning?
by BrowserUk (Patriarch) on Feb 06, 2010 at 02:50 UTC

    Okay. I should have checked which post you were responding to. I thought you were saying that you used split to deliberately, implicitly split to @_;

    I also use shift/pop implicitly on @ARGV, especially in one liners. But in scripts I have tried to force myself to explicitly state @ARGV. I still use implicit shifts and pops within subs.

    But LanX was only suggesting some features be disable if you used no oddities; or similar, so it wouldn't stop anyone doing so, unless they chose not to. Kinda of a cut down, runtime actioned perl::critic, but without the dogmas...


    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.