Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jk2addict (4946)

jk2addict
  (email not shown publicly)
http://today.icantfocus.com/blog/
AOL IM: chrislaco (Add Buddy, Send Message)
Yahoo! ID: chrislaco@sbcglobal.net (Add User, Send Message)
Jabber: laco@scribblewerks.com

Journal of jk2addict (4946)

Thursday January 10, 2008
11:43 PM

Perl Tidy: Huh?

[ #35357 ]
I confess, I like ending all ifs/elses/subs with a semicolon:

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?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.