Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • You could use Syntax::Highlight::Universal (it needs a patch from RT to help it compile). If you just have it tokenize and create the HTML from it, it's simply elements with classes. Then you can control every detail of the color using CSS.

    I've done this before for with a Spork plugin that would let me easily wrap my code samples with something like .syntax perl
    or .syntax html

    It was really useful when I give multi language talks (Perl/JavaScript/HTML/CSS).

    I never put my plugin up on CPAN or into SVN, so whe
    • I don't get it. How can CSS help me produce color RTF?
      --
      rjbs
      • Well, I feel silly. For some reason I thought you were doing syntax hilighting into HTML and then converting to RTF. But you're using RTF::Writer, duh. Sorry for the noise...
        • No problem. If nothing else, now I know I can look at one more highlighting engine eventually! Thanks.
          --
          rjbs
  • Is VIM's colorizing better than PerlTidy's for your purpose?
    --
    Bill
    # I had a sig when sigs were cool
    use Sig;
    • I haven't tried it, but I'm guessing it will be -- only because it will be exactly what I'm used to seeing in my editor.

      I'll try to check it out.
      --
      rjbs
      • PerlTidy is adjustable.

        The Perl Advent Calendar [pm.org] uses perltidy -nnn -html -css=../style.css [* [perladvent.org] * [pm.org]] so the CSS file sets the colors.

        You could edit that file to get the VIM look with PerlTidy. PerlTidy can also adapt its indenting etc. to suit most standards. E.g., I think PBP has Tidy definition of it's recommended format. Spod5 [perladvent.org] is a perl-based pod-to-S5 slide systm that can filter code through perltidy.

        --
        Bill
        # I had a sig when sigs were cool
        use Sig;