On Fri, 23 Apr 2004 12:51:26 +0200
Ken Burcham <[EMAIL PROTECTED]> wrote:
Hi Ken,
> I notice in the pod some things say:
>
>PerlSetVar HighlihtCSS /highlight/perl.css
>
> and some things say
>
>PerlSetVar HighlightCache On
>
>Notice the "Highlight" vs "Highliht"... Just wanted to point
>that out in case one was actually wrong. :)
That's my fault!
Thanks for the notice, asap I'll upload new distribution to CPAN with these
corrections (of course, "Highlight" is correct).
>Also, could I use something like this for displaying perl
>fragments on web pages? or is it only when you're looking at a
>whole perl file? sorry if that's a dumb question...
Interesting.
I see three roads:
1. Include fragment code in your pages with SSI-like tecnhique. For example
with simple Apache built-in SSI:
---sample.shtml, CUTE HERE---
Following <A HREF="/fragments/code1.pl?download">code</A>:
<TABLE BGCOLOR="#EEEEEE"><TR><TD>
<!--#include virtual="/fragments/code1.pl" -->
</TD></TR></TABLE>
shows how to...
---sample.shtml, CUTE HERE---
Notice that you must to put all Perl code fragments under sistem directory
managed by Apache::Syntax::Highlight::Perl and mapped by /fragments/ URI.
2. Improve Apache::Syntax::Highlight::Perl in order to highlight code supplied
on the fly. For example by passing an additional param 'code' to query string.
3. Use Syntax::Highlight::Perl directly in order to build your pages (but
with no line numbers or caching features) with code fragments.
by
- Enrico
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html