Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: need help divining PerlTidy option

by 2teez (Priest)
on Oct 25, 2012 at 21:26 UTC ( #1000946=note: print w/replies, xml ) Need Help??


in reply to need help divining PerlTidy option

Okay, I can live with PerlTidy wanting to dictate line length, but what fresh hell prevents it from aligning that string on the new line with... at the very least, the innermost enclosing for loop? Ideally, it would be aligned with the or die on the previous line

The default maximum line length Perltidy uses is 80 columns ( though not cast in stone ), as stated in the Perltidy documentation.
However, you can change that like so:
perltidy -l=85 perlscript.pl Please, note the -l=85.
Given, the OP preferred format, the CLI command work for me to produce the format you want:

perltidy -b -i=3 -l=90 perlscript.pl
Please, see EXAMPLES under Perltidy documentation.

Note, I will advice you don't go beyond between 72 to 82 columns line length except you know what you are doing (ofcourse you do).
Another option is that, you can reformat manually after using Perltidy or what about that?

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000946]
help
Chatterbox?
[1nickt]: ( The 17" monster I just bought is for my wife, who doesn;t leave the house with it...)
[Corion]: 1nickt: No, I'm using it with Windows 10, but with the 4k display, yes. It's a very nice build IMO, and relatively sturdy. Also, it got 8 or 9 on the ifixit repair scale, which I consider good
[Corion]: ... especially as I expect to have to replace the battery set in two or three years' time
[1nickt]: Nice. So happy that Dells are still user-repairable. Unusual these days.
[1nickt]: I will certainly not be buying any more Macs.
[Corion]: 1nickt: Yeah, or at least, I hopoe so ;)

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2017-03-27 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.