Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
This is very cool, clemburg. ++ for that. I was going to comment about cperl-mode, but I didn't know how to automate the process. Thanks!

Just for the sake of completeness, be aware that cperl sometimes breaks with funky perl code such as regexes, here documents, unusual quoting and things like that. But other than that it's an excellent way of doing it.

For printing Perl code, I usually use xemacs' "pretty-print" option, which is loaded with some package I can't remember right now. I don't know how to invoke it in batch mode though - you have to manually load the file and select the option from the menu. Pretty-print generates postscript according to your current font-lock settings, so you get colors (shading in a b/w printer), bold, etc.


In reply to RE: Re: how to indent/pretty print perl code by ZZamboni
in thread how to indent/pretty print perl code by snowcrash

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (9)
    As of 2018-04-19 10:47 GMT
    Find Nodes?
      Voting Booth?