Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: perltidy safety

by Joost (Canon)
on Aug 09, 2005 at 16:10 UTC ( #482283=note: print w/replies, xml ) Need Help??


in reply to perltidy safety

"yes" and "not without a backup and some tests" respectively.

In the few cases I've seen perltidy break code, it broke in such a way that the resulting syntax was invalid (this was a couple of years ago, I can't remember the specifics), so running "perl -c" against the resulting code should give you some indication - if it fails, your code was mangled.

update: just to clear this up: I don't use perltidy all that regulary, but I've used it a couple of times in the last year, and I haven't seen any breaks then (on about 50 files or so). All breaking I've experienced was years ago - this probably depends on your coding style - YMMV.

update 2: also "if it fails, your code was mangled" does not imply that your code isn't mangled if "perl -c code.pl" succeeds.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2021-03-01 11:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?