| CatalystX-Usul documentation | Contained in the CatalystX-Usul distribution. |
CatalystX::Usul::ProjectDocs - Generates CPAN like pod pages
0.3.$Revision: 616 $
use CatalystX::Usul::ProjectDocs;
my $pd = CatalystX::Usul::ProjectDocs->new( outroot => $htmldir,
libroot => $libroot,
title => $meta->name,
desc => $meta->abstract,
lang => q(en), );
$pd->gen();
Inherits from Pod::ProjectDocs but replaces Syntax::Highlight::Universal with Syntax::Highlight::Perl
None
None
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan, <Support at RoxSoft.co.uk>
Copyright (c) 2008 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
| CatalystX-Usul documentation | Contained in the CatalystX-Usul distribution. |
# @(#)$Id: ProjectDocs.pm 616 2009-06-30 11:06:46Z pjf $ package CatalystX::Usul::ProjectDocs; use strict; use warnings; use version; our $VERSION = qv( sprintf '0.3.%d', q$Rev: 616 $ =~ /\d+/gmx ); use parent qw(Pod::ProjectDocs); use Text::Tabs; my %SCHEME = ( Variable_Scalar => [ '<font color="#CC6600">', '</font>' ], Variable_Array => [ '<font color="#FFCC00">', '</font>' ], Variable_Hash => [ '<font color="#990099">', '</font>' ], Variable_Typeglob => [ '<font color="#000000">', '</font>' ], Subroutine => [ '<font color="#339933">', '</font>' ], Quote => [ '<font color="#000000">', '</font>' ], String => [ '<font color="#3399FF">', '</font>' ], Comment_Normal => [ '<font color="#ff0000"><i>', '</i></font>' ], Comment_POD => [ '<font color="#ff9999">', '</font>' ], Bareword => [ '<font color="#000000">', '</font>' ], Package => [ '<font color="#000000">', '</font>' ], Number => [ '<font color="#003333">', '</font>' ], Operator => [ '<font color="#999999">', '</font>' ], Symbol => [ '<font color="#000000">', '</font>' ], Keyword => [ '<font color="#0000ff"><b>', '</b></font>' ], Builtin_Operator => [ '<font color="#000000">', '</font>' ], Builtin_Function => [ '<font color="#000000">', '</font>' ], Character => [ '<font color="#3399FF"><b>', '</b></font>' ], Directive => [ '<font color="#000000"><i><b>', '</b></i></font>' ], Label => [ '<font color="#000000">', '</font>' ], Line => [ '<font color="#000000">', '</font>' ], ); BEGIN { no warnings q(redefine); ## no critic our $HIGHLIGHTER; eval { require Syntax::Highlight::Perl; $HIGHLIGHTER = Syntax::Highlight::Perl->new; }; if ($HIGHLIGHTER) { *Pod::ProjectDocs::Parser::highlighten = sub { my ($self, $type, $text) = @_; $HIGHLIGHTER->set_format( \%SCHEME ); $HIGHLIGHTER->define_substitution( q(<) => q(<), q(>) => q(>), q(&) => q(&) ); $tabstop = 3; # Text::Tabs return $HIGHLIGHTER->format_string( expand( $text ) ); } } else { eval { require Syntax::Highlight::Universal; $HIGHLIGHTER = Syntax::Highlight::Universal->new; }; if ($HIGHLIGHTER) { *Pod::ProjectDocs::Parser::highlighten = sub { my ($self, $type, $text) = @_; return $HIGHLIGHTER->highlight( $type, $text ); }; } else { *Pod::ProjectDocs::Parser::highlighten = sub { return $_[2] }; } } } 1; __END__
# Local Variables: # mode: perl # tab-width: 3 # End: