http://qs1969.pair.com?node_id=814382


in reply to Re^2: Help with Coding Style
in thread Help with Coding Style

Actually, using Perl::Critic doesn't help you to improves one style. It will however help you mimic the style of the people in charge of Perl::Critic.

... Who more or less mimic the style suggested by Damian Conway. Since i started using Perl::Critic, i get from an idea to working bugless code faster. Everyone is free not to use it.

I loathe this kind of advice. You give two alternatives to a line, without any explanation of why any of the alternatives are better. I certainly don't see any problem with the first line than any of the alternatives solves.

Writing my ($self) = @_ is not wrong, but it may mean that the coder - who admits to being a novice - is not sure that he knows what it means. I am showing other ways to pass args, TMTOWTDI.

You may loathe it, but i hope that it encourages people to read documentation. Maybe i'm wrong.

Replies are listed 'Best First'.
Re^4: Help with Coding Style
by BrowserUk (Patriarch) on Dec 26, 2009 at 00:38 UTC
    working bugless code

    You're living in cloud cuckoo land. There's no such thing..


    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.
Re^4: Help with Coding Style
by JavaFan (Canon) on Dec 25, 2009 at 23:46 UTC
    Writing my ($self) = @_ is not wrong, but it may mean that the coder - who admits to being a novice - is not sure that he knows what it means.
    I find that extremely insulting - it's a long time I've seen such an insult in the Perl community. "Oh, you might write a line of code of which nothing is wrong - but I'll presume you're an idiot and you don't understand your own code." And what makes you think he'll understand your two alternatives? Which you give without explanation? I mean, you're assuming the OP doesn't understand the code he wrote himself, how is he to understand your code?

    The Perl community used to be known for insulting newbies making mistakes, but you're way past that. You're insulting a newbie for writing good code.

    Shame on you.