RE: Pretty Printing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2003-10-14 at 13:17, Syed Ali wrote:
> Oh, I apologize for the confusion.

No problem.

> I am asking about printing my perl code itself, and not about printing
> from within Perl.
> For example, I am have 1000 line Perl program which I want to print on
> my HP printer.
> I can use enscript as in: 
> 
> $enscript -2 -dprinter myperlprogram.pl
> 
> Or I can use lpr or trueprint or mprint. But none of them are Perl
> aware, i.e., they do not highlight subroutines, etc.
> Trueprint for example, "understands" C code, and can mark C functions
> while printing so that they are very easy to read when printed on
> paper.
> I am hoping there is a utility which if used to print my perl program
> will make reading the program easier.
> (I understand that writing easy to read Perl code is the first step.
> :-) )

Ok, now I understand.  You're looking for a Perl syntax
formatter/highlighter for printing.  Here are some vague suggestions. 
Hopefully one of them will fit the bill.  If not, perhaps you can chain
them together to satisfy your needs.

* Kate - KDE editor.  Supports syntax highlighting for Perl. [colorify]
* perltidy - (http://perltidy.sourceforge.net/) Perl script which
indents and reformats Perl code, making it easier to read [indentify]
* Webcpp - A command line utility that takes your source code and
converts it into an HTML file using a fully customizable syntax
highlighting engine and colour schemes. [colorify]

I envision piping your code through a combination of perltidy -> webcpp
-> html2ps -> lp.

HTH.

-- 
Jason Dixon, RHCE
DixonGroup Consulting
http://www.dixongroup.net


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux