jk2addict has asked for the wisdom of the Perl Monks concerning the following question:
I confess, I like ending all ifs/elses/subs with a semicolon. Call me a semicolon purist. Maybe it's that I do so much perl/c#/javascript that I just like being more consistent everywhere.
if (...) { }; sub foo { if (...) { }; };
I'm trying perltidy...again, and quickly I start banging my head. When I add -ndsm to my rc, I get this:
if (...) { } ; sub foo { if (...) { } ; };
My current rc is:
-l=78 -i=4 -ci=4 -bar -ce -nsbl -sot -sct -pt=2 -sbt=2 -bt=2 -bbt=2 -nsfs -asc -ndsm
I'm sure there's no way to get what I want on this either:
$foo->bar( $self->this($that, $other) );
When using object->method as method params, I like the indent, otherwise, just put the params on the same line in ().
$foo->bar($this, $that);
How do I beat perltidy into submission?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Tidy Question
by Fletch (Bishop) on Jan 11, 2008 at 19:44 UTC | |
by dorko (Prior) on Jan 11, 2008 at 20:10 UTC | |
by Fletch (Bishop) on Jan 11, 2008 at 20:22 UTC | |
by dorko (Prior) on Jan 11, 2008 at 20:36 UTC |