Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 having an uproarious good time at the Monastery: (3)
As of 2015-07-04 23:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls