Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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(); #

--
John.


Comment on Re: Perl::Tidy formatting question
Select or Download Code
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2014-12-18 02:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (41 votes), past polls