Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2017-02-20 22:31 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (304 votes). Check out past polls.