Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Your Favorite Options for Perltidy

by pboin (Deacon)
on Nov 06, 2005 at 00:52 UTC ( [id://506047]=note: print w/replies, xml ) Need Help??


in reply to Your Favorite Options for Perltidy

TheDamian's book Perl Best Practices has a very good perltidyrc. You need this book. I can not recommend it highly enough.

Here's your sign^H^H^H^Hlink: PBP's .perltidyrc file, was Re: Perl Best Practices

Replies are listed 'Best First'.
Re^2: Your Favorite Options for Perltidy
by Anonymous Monk on Nov 06, 2005 at 09:30 UTC
    Thanks so much. But when does .perltidyrc get executed?
    • automatically when we start a perl script? or
    • when we pass the command: $ perltidy myfile.pl ?

      Nothing's *automatic* per se. Perltidy is a filter that you run on source. As TheDamian has it setup, it will print to STDOUT, so you can do something like this:

      perltidy sloppy_format.pl > cleaned_up.pl

      .perltidyrc will be automatically called for configuration details. Once you get that figured out, you can even hightlight one block in vim and do "! perltidy" to cleanup just a block within a file.

      Good luck and perservere. Tidy code is a worthwhile endeavor, whether you create it that way or beat it into submission with a tool.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-20 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found