How Do I Tweak Perltidy Method/Funtion-call blocks?

Say I have some icky code like this:

my $process = Background->new($^X, "-I$lib",
                              "-MMyLong:Namespace::Bar::Bat",
                              "-e 1", "other", "arguments", "here");

Perltidy witll turn it into this:

my $process = Background->new( $^X, "-I$lib", "-MMyLong:Namespace::Bar::Bat",
    "-e 1", "other", "arguments", "here" );

That's a little better, but I'd much rather that it made it look like this:

my $process = Background->new(
    $^X,    "-I$lib", "-MMyLong:Namespace::Bar::Bat",
    "-e 1", "other",  "arguments", "here",
);

Or even this:

my $process = Background->new(
    $^X,
    "-I$lib",
    "-MMyLong:Namespace::Bar::Bat",
    "-e 1",
    "other",
    "arguments",
    "here",
);

Anyone know how to get it to do that? If so, please leave a comment!

Backtalk

Emanuele zeppieri wrote:

What a horrible formatting! My fault, sorry (though a preview button would be very appreciated ;-)

I meant:

# perltidy -boc your_file.pl

will produce this:

my $process = Background->new(
    $^X, "-I$lib",
    "-MMyLong:Namespace::Bar::Bat",
    "-e 1", "other", "arguments", "here"
);

Ciao,
Emanuele.