Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^2: There's a level in Hell reserved for ________

by Aristotle (Chancellor)
on Mar 03, 2003 at 04:54 UTC ( #239952=note: print w/replies, xml ) Need Help??

in reply to Re: There's a level in Hell reserved for ________
in thread There's a level in Hell reserved for ________

indent_the_arguments_of_long_functions( like, this, you, morons );
++ for that one alone. Thank goodness for Perltidy.
open F, ">$tmp"; print F @a; print F $new_item; close F; open F, "<$tmp"; @a = <F>; close F;

Wow, that's worse than what I had to deal with in UBB5.

And I agree with the point about GUIs, though I feel I have to point out that for simple things they can be far more convenient than the commandline. I'm thinking iTunes here. Of course, it's actually very hard to design a good graphical interface, and the majority of what's around just sucks.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^2: There's a level in Hell reserved for ________
by perrin (Chancellor) on Mar 03, 2003 at 20:04 UTC
    Um, doesn't perltidy indent the arguments too? After all, that is the generally accepted style for Perl.
      Might by default (though a quick skim of the POD suggests otherwise), but you can certainly configure it to suit your tastes.
      $ cat .perltidyrc --indent-columns=4 --continuation-indentation=4 --maximum-line-length=80 --entab-leading-whitespace=4 --tabs --paren-tightness=2 --brace-tightness=1 --block-brace-tightness=0 --square-bracket-tightness=1 --nooutdent-long-quotes --indent-spaced-block-comments --outdent-long-comments --closing-side-comments --closing-side-comment-interval=25 --closing-side-comment-list="sub : BEGIN END" --long-block-line-count=4 --maximum-consecutive-blank-lines=2 #--standard-output #--standard-error-output

      Makeshifts last the longest.

      the generally accepted style for Perl??? I think not! Sure, it's a meme that gets around. But it's sucky, and needs to be squashed by anyone and everyone who thinks about it consciously. Put simply, there is no reason to do it that way, and there are good reasons not to do it that way.

      The 6th Rule of Perl Club is -- There is no Rule #6.

        I've always used this style for args:
        my_function_call( $arg1, $arg2, $arg3, );
        And for really long ones that would wrap, I do something like this:
        My::Module::With::Really::Long::Name::and_function_call( $arg1, $arg2, $arg3, );
        Keeping each arg on a separate line makes them easy to read and easy to change, in my opinion. It is the most common style I've seen in use by experienced Perl programmers.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://239952]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2018-04-26 21:27 GMT
Find Nodes?
    Voting Booth?