Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Disable perltidy in a region?

by ambrus (Abbot)
on Jan 10, 2006 at 19:09 UTC ( [id://522286]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

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

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

    No recent polls found