The stupid question is the question not asked | |
PerlMonks |
Re: perltidy safetyby Joost (Canon) |
on Aug 09, 2005 at 16:10 UTC ( [id://482283]=note: print w/replies, xml ) | Need Help?? |
"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.
In Section
Seekers of Perl Wisdom
|
|