in reply to Disable perltidy in a region?

eval q{ put code here };

Replies are listed 'Best First'.
Re^2: Disable perltidy in a region?
by RMGir (Prior) on Jan 10, 2006 at 21:28 UTC

    That would work. It has a runtime penalty associated with it, though, if the eval happens more than once.

    I think.


    Mike

      I don't think he's suggesting to definitively turn (possibly) large chunks of code into string evals and otoh diotalevi is not likely to do anything like that - unless it's for an astonishing trick of his, that is!

      I think he's suggesting to trick perltidy temporarily. I don't use perltidy myself, but my editor generally does a good job automatically indenting the code for me. However for Perl that's hard and occasionally fails. In those cases I insert comments and trick it into thinking the code is somewhat more "regular" than it actually is, so that it can indent it nicely. Then I undo the local modifications.