Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Perl::Tidy formatting question

by jmcnamara (Monsignor)
on Oct 26, 2011 at 17:41 UTC ( #933952=note: print w/replies, xml ) Need Help??

in reply to Perl::Tidy formatting question

The PerlTidy manpage doesn't mention chained methods so I guess it doesn't handle them.

As a workaround you could format the code manually and then tell it to ignore that block with PerlTidy --format-skipping (#<<< #>>>) comments:

#<<< my $res = SOAP::Lite ->autotype(0) ->uri('http:....') ->proxy('http:...') ->function_call(); #>>>

Of course if you have hundreds of instances like this then that will quickly become a pain.

You can also force alignment by using comments at the end of each line or newlines between them (but neither of those has much advantage over the above):

my $res = SOAP::Lite # ->autotype( 0 ) # ->uri( 'http:....' ) # ->proxy( 'http:...' ) # ->function_call(); #


Replies are listed 'Best First'.
Re^2: Perl::Tidy formatting question
by pukku (Novice) on Oct 26, 2011 at 17:57 UTC

    Thanks. That's what I thought, given my reading through the man page, but I was hoping someone knew something I didn't...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://933952]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2021-03-02 11:36 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (42 votes). Check out past polls.