libsyntax-highlight-engine-simple-languages-perl-1/0000755000000000000000000000000011212457451017524 5ustar libsyntax-highlight-engine-simple-languages-perl-1/debian/0000755000000000000000000000000011212457537020753 5ustar libsyntax-highlight-engine-simple-languages-perl-1/debian/control0000644000000000000000000000241611211520672022347 0ustar # Generated by refresh.pl from debian/packages.cfg. Edits may be lost. Source: libsyntax-highlight-engine-simple-languages-perl Section: perl Priority: optional Maintainer: Debian Perl Group Uploaders: David Bremner Build-Depends: debhelper (>= 7.0.50), quilt (>= 0.46-7) Build-Depends-Indep: perl (>= 5.6.10-12), libuniversal-require-perl, perl-modules (>= 5.10) | libversion-perl, libtest-perl-critic-perl, libtest-pod-perl, libtest-pod-coverage-perl, libsyntax-highlight-engine-simple-perl Standards-Version: 3.8.1 Package: libsyntax-highlight-engine-simple-languages-perl Architecture: all Depends: perl (>= 5.8.0-7), ${misc:Depends} Enhances: libsyntax-highlight-engine-simple-perl Description: Perl module collection providing syntax highlighting Syntax::Highlight::Engine::Simple provides a framework for generating coloured HTML from source code and similar text using regular expressions, controlled by cascading stylesheets (CSS). This package provides subclasses definining syntax for concrete languages. . Currently, this package includes the following modules: . * Syntax-Highlight-Engine-Simple-Perl (syntax highlighting for Perl) * Syntax-Highlight-Engine-Simple-HTML (syntax highlighting for HTML) libsyntax-highlight-engine-simple-languages-perl-1/debian/packages.cfg0000644000000000000000000000163111210625357023206 0ustar # -*- Debian-control -*- Module: Syntax-Highlight-Engine-Simple-Perl Author: Sugama Keita Description: syntax highlighting for Perl Upstream-Version: 0.2 Watch: http://search.cpan.org/CPAN/authors/id/J/JA/JAMADAM/Syntax-Highlight-Engine-Simple-Perl-([\d.]+).tar.gz Copyright: © 2008, Sugama Keita . License: Perl This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. Module: Syntax-Highlight-Engine-Simple-HTML Author: Sugama Keita Description: syntax highlighting for HTML Upstream-Version: 0.2 Watch: http://search.cpan.org/CPAN/authors/id/J/JA/JAMADAM/Syntax-Highlight-Engine-Simple-HTML-([\d.]+).tar.gz Copyright: © 2008, Sugama Keita . License: Perl This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. libsyntax-highlight-engine-simple-languages-perl-1/debian/copyright.in0000644000000000000000000000142311210535217023301 0ustar This package contains several upstream packages; individual licenses are listed below. They are all downloaded from http://search.cpan.org/ #COPYRIGHT_STANZAS# Files: debian/* Copyright: © 2009, David Bremner © 2009, Jonathan Yu License: Packaging may be distributed under the same terms as Perl (see below) Perl is distributed under licenses: a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" which comes with Perl. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL and the Artistic Licence in /usr/share/common-licenses/Artistic.libsyntax-highlight-engine-simple-languages-perl-1/debian/copyright0000644000000000000000000000330111211520672022671 0ustar # Generated by refresh.pl from debian/packages.cfg. Edits may be lost. This package contains several upstream packages; individual licenses are listed below. They are all downloaded from http://search.cpan.org/ Module: Syntax-Highlight-Engine-Simple-Perl Author: Sugama Keita Description: syntax highlighting for Perl Upstream-Version: 0.2 Watch: http://search.cpan.org/CPAN/authors/id/J/JA/JAMADAM/Syntax-Highlight-Engine-Simple-Perl-([\d.]+).tar.gz Copyright: © 2008, Sugama Keita . License: Perl This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. Module: Syntax-Highlight-Engine-Simple-HTML Author: Sugama Keita Description: syntax highlighting for HTML Upstream-Version: 0.2 Watch: http://search.cpan.org/CPAN/authors/id/J/JA/JAMADAM/Syntax-Highlight-Engine-Simple-HTML-([\d.]+).tar.gz Copyright: © 2008, Sugama Keita . License: Perl This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. Files: debian/* Copyright: © 2009, David Bremner © 2009, Jonathan Yu License: Packaging may be distributed under the same terms as Perl (see below) Perl is distributed under licenses: a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" which comes with Perl. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL and the Artistic Licence in /usr/share/common-licenses/Artistic.libsyntax-highlight-engine-simple-languages-perl-1/debian/watch0000644000000000000000000000055111212337707022001 0ustar # Generated by refresh.pl from debian/packages.cfg. Edits may be lost. # format version number, currently 3; this line is compulsory! version=3 http://search.cpan.org/CPAN/authors/id/J/JA/JAMADAM/Syntax-Highlight-Engine-Simple-Perl-([\d.]+).tar.gz 0.2 http://search.cpan.org/CPAN/authors/id/J/JA/JAMADAM/Syntax-Highlight-Engine-Simple-HTML-([\d.]+).tar.gz 0.2 libsyntax-highlight-engine-simple-languages-perl-1/debian/refresh.pl0000644000000000000000000000262411210625357022745 0ustar #!/usr/bin/perl # Copyright © 2009, David Bremner # This file may be distributed under the same terms as Perl: Artistic license or GPL 1+ use strict; use Parse::DebControl; use File::Slurp; my $header="# Generated by refresh.pl from debian/packages.cfg. Edits may be lost.\n"; my %xform=( 'debian/copyright.in'=>{'#COPYRIGHT_STANZAS#'=>\©right_stanzas}, 'debian/control.in'=> {'#MODULE_DESC_LIST#'=>\&module_desc_list}, 'debian/watch.in'=> {'#WATCH_LIST#'=>\&watch_list} ); my $parser=new Parse::DebControl; my $pkgconf=$parser->parse_file("debian/packages.cfg", {useTieIxHash=>1,stripComments=>1}) || die "parser failed: $!"; for my $file (keys %xform) { my %subst=%{$xform{$file}}; my $content=$header . read_file($file); for my $token (keys %subst){ my $val=&{$subst{$token}}; $content=~s/$token/$val/; } my $outfile= $file; $outfile =~ s/\.in$//; write_file($outfile,$content); } sub short_desc($){ my $module=shift; my $desc=$module->{Description}; $desc=~s/\n.*//; return $desc; } sub copyright_stanzas{ my @list=map { $parser->write_mem($_); } @{$pkgconf}; return join("\n\n",@list); } sub watch_list{ my @list=map {$_->{Watch} . " ". $_->{'Upstream-Version'} } @{$pkgconf}; return join("\n",@list); } sub module_desc_list{ my @list=map {" * ". $_->{Module} . " (". short_desc($_) .")" } @{$pkgconf}; return join("\n",@list); } libsyntax-highlight-engine-simple-languages-perl-1/debian/patches/0000755000000000000000000000000011212457451022375 5ustar libsyntax-highlight-engine-simple-languages-perl-1/debian/patches/pod-shes-HTML0000644000000000000000000000615311212457235024611 0ustar Description: correct some small errors in pod, including version number, str->file as doFile parameter, and spelling. Index: libsyntax-highlight-engine-simple-languages-perl/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/Syntax/Highlight/Engine/Simple/HTML.pm =================================================================== --- libsyntax-highlight-engine-simple-languages-perl.orig/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/Syntax/Highlight/Engine/Simple/HTML.pm 2009-06-06 09:01:59.000000000 -0300 +++ libsyntax-highlight-engine-simple-languages-perl/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/Syntax/Highlight/Engine/Simple/HTML.pm 2009-06-06 09:04:45.000000000 -0300 @@ -52,11 +52,11 @@ =head1 VERSION -This document describes Syntax::Highlight::Engine::Simple::HTML version 0.0.1 +This document describes Syntax::Highlight::Engine::Simple::HTML version 0.2 =head1 SYNOPSIS -Constractor +Constructor use Syntax::Highlight::Engine::Simple::HTML; @@ -77,13 +77,13 @@ tab_width => 4); $highlighter->doFile( - str => $str, + file => $name, tab_width => 4, encode => 'utf8'); =head1 DESCRIPTION -This is a sub class of Syntax::Highlight::Engine::Simple. +This is a subclass of Syntax::Highlight::Engine::Simple. A working example of This module is at bellow. @@ -97,7 +97,7 @@ =item type -File type. This argument causes specific sub class to be loaded. +File type. This argument causes specific subclass to be loaded. =back @@ -107,7 +107,7 @@ =item html_escape_code_ref -HTML escape code ref. Default subroutine escapes 3 charactors '&', '<' and '>'. +HTML escape code ref. Default subroutine escapes 3 characters '&', '<' and '>'. =back @@ -144,7 +144,7 @@ =item tab_width -Tab width for tab-space conversion. -1 for disable it. -1 is the defult. +Tab width for tab-space conversion. -1 for disable it. -1 is the default. =back @@ -153,7 +153,7 @@ Highlighting files. $highlighter->doStr( - str => $str, + file => $name, tab_width => 4, encode => 'utf8' ); @@ -166,11 +166,11 @@ =item tab_width -Tab width for tab-space conversion. -1 for disable it. -1 is the defult. +Tab width for tab-space conversion. -1 to disable it. -1 is the default. =item encode -Set the encode of file. utf8 is the default. +Set the encoding of file. utf8 is the default. =back @@ -192,7 +192,7 @@ =head2 setSyntax -This is a method for initializing the syntax. It is called by constractor so +This is a method for initializing the syntax. It is called by the constructor so you may not have to call it manually. =head1 Example @@ -228,7 +228,7 @@ =head1 CONFIGURATION AND ENVIRONMENT -Syntax::Highlight::Engine::Simple::HTML requires no configuration files or environment variables. Specific language syntax can be defined with sub classes and loaded in constractor if you give it the type argument. +Syntax::Highlight::Engine::Simple::HTML requires no configuration files or environment variables. Specific language syntax can be defined with subclasses and loaded in the constructor if you give it the type argument. =head1 DEPENDENCIES libsyntax-highlight-engine-simple-languages-perl-1/debian/patches/series0000644000000000000000000000003411211506132023575 0ustar pod-shes-Perl pod-shes-HTML libsyntax-highlight-engine-simple-languages-perl-1/debian/patches/pod-shes-Perl0000644000000000000000000000600611212457235024744 0ustar Description: correct some small errors in pod, including version number, str->file as doFile parameter, and spelling. Index: libsyntax-highlight-engine-simple-languages-perl/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/Syntax/Highlight/Engine/Simple/Perl.pm =================================================================== --- libsyntax-highlight-engine-simple-languages-perl.orig/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/Syntax/Highlight/Engine/Simple/Perl.pm 2009-06-06 08:50:58.000000000 -0300 +++ libsyntax-highlight-engine-simple-languages-perl/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/Syntax/Highlight/Engine/Simple/Perl.pm 2009-06-06 09:03:16.000000000 -0300 @@ -333,11 +333,11 @@ =head1 VERSION -This document describes Syntax::Highlight::Engine::Simple::Perl version 0.0.1 +This document describes Syntax::Highlight::Engine::Simple::Perl version 0.2 =head1 SYNOPSIS -Constractor +Constructor use Syntax::Highlight::Engine::Simple::Perl; @@ -358,13 +358,13 @@ tab_width => 4); $highlighter->doFile( - str => $str, + file => $name, tab_width => 4, encode => 'utf8'); =head1 DESCRIPTION -This is a sub class of Syntax::Highlight::Engine::Simple. +This is a subclass of Syntax::Highlight::Engine::Simple. A working example of This module is at bellow. @@ -378,7 +378,7 @@ =item type -File type. This argument causes specific sub class to be loaded. +File type. This argument causes specific subclass to be loaded. =back @@ -388,7 +388,7 @@ =item html_escape_code_ref -HTML escape code ref. Default subroutine escapes 3 charactors '&', '<' and '>'. +HTML escape code ref. Default subroutine escapes 3 characters '&', '<' and '>'. =back @@ -425,7 +425,7 @@ =item tab_width -Tab width for tab-space conversion. -1 for disable it. -1 is the defult. +Tab width for tab-space conversion. -1 for disable it. -1 is the default. =back @@ -434,7 +434,7 @@ Highlighting files. $highlighter->doStr( - str => $str, + file => $name, tab_width => 4, encode => 'utf8' ); @@ -447,7 +447,7 @@ =item tab_width -Tab width for tab-space conversion. -1 for disable it. -1 is the defult. +Tab width for tab-space conversion. -1 for disable it. -1 is the default. =item encode @@ -473,7 +473,7 @@ =head2 setSyntax -This is a method for initializing the syntax. It is called by constractor so +This is a method for initializing the syntax. It is called by the constructor so you may not have to call it manually. =head2 getKeywords @@ -518,7 +518,7 @@ =head1 CONFIGURATION AND ENVIRONMENT -Syntax::Highlight::Engine::Simple::Perl requires no configuration files or environment variables. Specific language syntax can be defined with sub classes and loaded in constractor if you give it the type argument. +Syntax::Highlight::Engine::Simple::Perl requires no configuration files or environment variables. Specific language syntax can be defined with subclasses and loaded in the constructor if you give it the type argument. =head1 DEPENDENCIES libsyntax-highlight-engine-simple-languages-perl-1/debian/compat0000644000000000000000000000000211146312023022133 0ustar 7 libsyntax-highlight-engine-simple-languages-perl-1/debian/build-module.sh0000644000000000000000000000137711210601737023670 0ustar #!/bin/sh PERL=$(which perl) MAKE=$(which make) PERL5LIB="$DESTDIR/usr/share/perl5/" PERL="$PERL -I$PERL5LIB" if [ -d $1 ]; then echo "==========================================================================" echo "Make $1" echo "PERL5LIB = $PERL5LIB" echo "DESTDIR = $DESTDIR" echo "==========================================================================" else echo "directory $1 does not exist" exit 1 fi cd $1 if [ -r Build.PL ]; then $PERL Build.PL installdirs=vendor $PERL Build $PERL Build test $PERL Build install destdir=$DESTDIR else PERL5LIB=$PERL5LIB $PERL Makefile.PL INSTALLDIRS=vendor --skipdeps PERL5LIB=$PERL5LIB $MAKE PERL5LIB=$PERL5LIB $MAKE test $MAKE install DESTDIR=$DESTDIR fi libsyntax-highlight-engine-simple-languages-perl-1/debian/changelog0000644000000000000000000000044011211506132022604 0ustar libsyntax-highlight-engine-simple-languages-perl (1) unstable; urgency=low * Initial release (Closes: #515295) * Contains - Syntax::Highlight::Engine::Simple::Perl - Syntax::Highlight::Engine::Simple::HTML -- David Bremner Tue, 19 May 2009 09:15:31 -0300 libsyntax-highlight-engine-simple-languages-perl-1/debian/source.lintian-overrides0000644000000000000000000000035011210625357025624 0ustar # We provide a watch file to support our own maintenance, even though there # is no upstream tarball, and DEHS will ignore the watch file. libsyntax-highlight-engine-simple-languages-perl source: debian-watch-file-in-native-package libsyntax-highlight-engine-simple-languages-perl-1/debian/control.in0000644000000000000000000000211411211506132022742 0ustar Source: libsyntax-highlight-engine-simple-languages-perl Section: perl Priority: optional Maintainer: Debian Perl Group Uploaders: David Bremner Build-Depends: debhelper (>= 7.0.50), quilt (>= 0.46-7) Build-Depends-Indep: perl (>= 5.6.10-12), libuniversal-require-perl, perl-modules (>= 5.10) | libversion-perl, libtest-perl-critic-perl, libtest-pod-perl, libtest-pod-coverage-perl, libsyntax-highlight-engine-simple-perl Standards-Version: 3.8.1 Package: libsyntax-highlight-engine-simple-languages-perl Architecture: all Depends: perl (>= 5.8.0-7), ${misc:Depends} Enhances: libsyntax-highlight-engine-simple-perl Description: Perl module collection providing syntax highlighting Syntax::Highlight::Engine::Simple provides a framework for generating coloured HTML from source code and similar text using regular expressions, controlled by cascading stylesheets (CSS). This package provides subclasses definining syntax for concrete languages. . Currently, this package includes the following modules: . #MODULE_DESC_LIST# libsyntax-highlight-engine-simple-languages-perl-1/debian/rules0000755000000000000000000000073111211764156022031 0ustar #!/usr/bin/make -f PACKAGE=libsyntax-highlight-engine-simple-languages-perl DESTDIR=$(CURDIR)/debian/$(PACKAGE)/ %: dh $@ override_dh_auto_configure: dh_quilt_patch override_dh_auto_install: for dir in src/*; do DESTDIR=$(DESTDIR) \ sh debian/build-module.sh $$dir; done find $(DESTDIR) -name '.packlist' -delete rm -rf $(CURDIR)/debian/$(PACKAGE)/usr/lib/ override_dh_auto_clean: for dir in src/*; do sh debian/clean-module.sh $$dir; done dh_quilt_unpatch libsyntax-highlight-engine-simple-languages-perl-1/debian/clean-module.sh0000644000000000000000000000072511212457235023653 0ustar #!/bin/sh PERL=$(which perl) MAKE=$(which make) if [ -d $1 ]; then echo "==========================================================================" echo "Clean $1" echo "==========================================================================" else echo "directory $1 does not exist" exit 1 fi cd $1 if [ -r Build.PL ]; then [ ! -f Build ] || ${PERL} Build --allow_mb_mismatch 1 distclean else [ ! -f Makefile ] || ${MAKE} realclean fi libsyntax-highlight-engine-simple-languages-perl-1/debian/watch.in0000644000000000000000000000012711210625357022404 0ustar # format version number, currently 3; this line is compulsory! version=3 #WATCH_LIST# libsyntax-highlight-engine-simple-languages-perl-1/src/0000755000000000000000000000000011212457451020313 5ustar libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/0000755000000000000000000000000011212457451027257 5ustar ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/0000755000000000000000000000000011212457451030025 5ustar ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/Syntax/libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/0000755000000000000000000000000011212457451030025 5ustar ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/Syntax/Highlight/libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/0000755000000000000000000000000011212457451030025 5ustar ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/Syntax/Highlight/Engine/libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/0000755000000000000000000000000011212457451030025 5ustar ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/Syntax/Highlight/Engine/Simple/libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/0000755000000000000000000000000011212457451030025 5ustar ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/Syntax/Highlight/Engine/Simple/HTML.pmlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/lib/0000644000000000000000000001416311211506132030022 0ustar package Syntax::Highlight::Engine::Simple::HTML; use strict; use warnings; use base qw(Syntax::Highlight::Engine::Simple); #use version; our $VERSION = '0.02'; ### ---------------------------------------------------------------------------- ### set syntax ### ---------------------------------------------------------------------------- sub setSyntax { shift->{syntax} = [ { class => 'tag', regexp => q!(?s)(?<=<).+?(?=>)!, }, { class => 'quote', regexp => q!(?s)'.*?'!, container => 'tag', }, { class => 'wquote', regexp => q!(?s)".*?"!, container => 'tag', }, { class => 'number', regexp => '\b\d+\b', container => 'tag', }, { class => 'comment', regexp => '(?s)', }, { class => 'url', regexp => q!s?https?://[-_.\!~*'()a-zA-Z0-9;/?:@&=+$,%#]+!, }, ]; } return 1; __END__ =head1 NAME Syntax::Highlight::Engine::Simple::HTML - (EXPERIMENTAL)HTML code highlighting class =head1 VERSION This document describes Syntax::Highlight::Engine::Simple::HTML version 0.0.1 =head1 SYNOPSIS Constractor use Syntax::Highlight::Engine::Simple::HTML; $highlighter = Syntax::Highlight::Engine::Simple::HTML->new(); or use Syntax::Highlight::Engine::Simple; $highlighter = Syntax::Highlight::Engine::Simple->new(type => 'HTML'); Highlighting stage $highlighter->doStr( str => $str, tab_width => 4); $highlighter->doFile( str => $str, tab_width => 4, encode => 'utf8'); =head1 DESCRIPTION This is a sub class of Syntax::Highlight::Engine::Simple. A working example of This module is at bellow. http://jamadam.com/dev/cpan/demo/Syntax/Highlight/Engine/Simple/ =head1 INTERFACE =head2 new =over =item type File type. This argument causes specific sub class to be loaded. =back =head2 setParams =over =item html_escape_code_ref HTML escape code ref. Default subroutine escapes 3 charactors '&', '<' and '>'. =back =head2 appendSyntax Append syntax by giving a hash. =over $highlighter->setSyntax( syntax => { class => 'quote', regexp => "'.*?'", container => 'comment', } ); =back =head2 doStr Highlighting strings. $highlighter->doStr( str => $str, tab_width => 4 ); =over =item str String. =item tab_width Tab width for tab-space conversion. -1 for disable it. -1 is the defult. =back =head2 doFile Highlighting files. $highlighter->doStr( str => $str, tab_width => 4, encode => 'utf8' ); =over =item file File name. =item tab_width Tab width for tab-space conversion. -1 for disable it. -1 is the defult. =item encode Set the encode of file. utf8 is the default. =back =head2 array2regexp This is a utility method for converting string array to regular expression. =over =back =head2 getClassNames Returns the class names in array. =over =back =head2 setSyntax This is a method for initializing the syntax. It is called by constractor so you may not have to call it manually. =head1 Example Here is a sample of CSS. pre.program_code span.keyword {color: #00f} pre.program_code span.keyword2 {color: #808} pre.program_code span.number {color: #f00} pre.program_code span.identifier {color: #a66} pre.program_code span.function {color: #a66; text-decoration: underline} pre.program_code span.method {color: #a66; text-decoration: underline} pre.program_code span.variable {color: #f80} pre.program_code span.statement {color: #00f} pre.program_code span.comment {color: #080} pre.program_code span.perlpod {color: #080} pre.program_code span.quote {color: #a66} pre.program_code span.wquote {color: #600} pre.program_code span.value {color: #a66} pre.program_code span.regexp_statement {background: #ffa} pre.program_code span.tag {color: #00f} pre.program_code span.url {color: #00f; text-decoration: underline} =head1 DIAGNOSTICS =over =item C<< doStr method got undefined value >> =item C<< File open failed >> =back =head1 CONFIGURATION AND ENVIRONMENT Syntax::Highlight::Engine::Simple::HTML requires no configuration files or environment variables. Specific language syntax can be defined with sub classes and loaded in constractor if you give it the type argument. =head1 DEPENDENCIES =over =item UNIVERSAL::require =item Syntax::Highlight::Engine::Simple =back =head1 INCOMPATIBILITIES None reported. =head1 BUGS AND LIMITATIONS No bugs have been reported. Please report any bugs or feature requests to C, or through the web interface at L. =head1 SEE ALSO =over =item L =back =head1 AUTHOR Sugama Keita C<< >> =head1 LICENCE AND COPYRIGHT Copyright (c) 2008, Sugama Keita C<< >>. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See I. =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. =cut libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/t/0000755000000000000000000000000011212457451027522 5ustar ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/t/pod.tlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/t/po0000644000000000000000000000021411211506132030046 0ustar #!perl -T use Test::More; eval "use Test::Pod 1.14"; plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; all_pod_files_ok(); ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/t/00.load.tlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/t/000000644000000000000000000000031111211506132027645 0ustar use Test::More tests => 1; BEGIN { use_ok( 'Syntax::Highlight::Engine::Simple::HTML' ); } diag( "Testing Syntax::Highlight::Engine::Simple::HTML $Syntax::Highlight::Engine::Simple::HTML::VERSION" ); ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/t/pod-coverage.tlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/t/po0000644000000000000000000000025411211506132030052 0ustar #!perl -T use Test::More; eval "use Test::Pod::Coverage 1.04"; plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; all_pod_coverage_ok(); ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/t/highlight.tlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/t/hi0000644000000000000000000000641311211506132030037 0ustar use strict; use warnings; use Test::More tests => 3; use Syntax::Highlight::Engine::Simple::HTML; use encoding 'utf8'; binmode(STDIN, ":utf8"); binmode(STDOUT, ":utf8"); binmode(STDERR, ":utf8"); my $highlighter = Syntax::Highlight::Engine::Simple::HTML->new(); my $expected = ''; my $result = ''; ### ---------------------------------------------------------------------------- ### 1. Define syntax ### ---------------------------------------------------------------------------- is( $highlighter->doStr(str => <<'ORIGINAL'), $expected=<<'EXPECTED' ); #01
target string
ORIGINAL <div class='test'>target string</div> EXPECTED ### ---------------------------------------------------------------------------- ### 2. Append syntax ### ---------------------------------------------------------------------------- $highlighter->appendSyntax( syntax => { class => 'addition', regexp => 'target', }, ); is( $highlighter->doStr(str => <<'ORIGINAL'), $expected=<<'EXPECTED' ); #01
target string
ORIGINAL <div class='test'>target string</div> EXPECTED ### ---------------------------------------------------------------------------- ### 3. Complicate ### ---------------------------------------------------------------------------- $result = $highlighter->doStr(str => <<'ORIGINAL', tab_width => 4); title "double quote out of tag" keyword out of tag test ORIGINAL is( $result, $expected=<<'EXPECTED' ); <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=EUC-JP"> <title>title</title> <link href="/css/itpro/2008/common.css" rel="stylesheet" type="text/css"> <script type='text/javascript'> <!-- var a = 'a'; //--> </script> </head> <body> "double quote out of tag" keyword out of tag <HtML><!-- case ignore test --> test </body> </html> EXPECTED ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/t/perlcritic.tlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/t/pe0000644000000000000000000000034311211506132030037 0ustar #!perl use strict; use Test::More; eval { require Test::Perl::Critic; Test::Perl::Critic->import(-profile => "t/perlcriticrc") }; plan skip_all => "Test::Perl::Critic is not installed." if $@; all_critic_ok("lib"); ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/t/perlcriticrclibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/t/pe0000644000000000000000000000011311211506132030032 0ustar # no strict 'refs' [TestingAndDebugging::ProhibitNoStrict] allow = refs ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/Build.PLlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/Buil0000644000000000000000000000107011211506132030061 0ustar use strict; use warnings; use Module::Build; my $builder = Module::Build->new( module_name => 'Syntax::Highlight::Engine::Simple::HTML', license => 'perl', dist_author => 'Sugama Keita ', dist_version_from => 'lib/Syntax/Highlight/Engine/Simple/HTML.pm', requires => { 'Test::More' => 0, 'version' => 0, 'Syntax::Highlight::Engine::Simple' => '0.02', }, add_to_cleanup => [ 'Syntax-Highlight-Engine-Simple-HTML-*' ], ); $builder->create_build_script(); ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/MANIFESTlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/MANI0000644000000000000000000000026211211506132027714 0ustar Build.PL Changes lib/Syntax/Highlight/Engine/Simple/HTML.pm Makefile.PL MANIFEST META.yml README t/00.load.t t/highlight.t t/perlcritic.t t/perlcriticrc t/pod-coverage.t t/pod.t ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/Changeslibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/Chan0000644000000000000000000000037011211506132030041 0ustar Revision history for Syntax-Highlight-Engine-Simple-HTML 0.0.2 Sat Jul 13 15:33:25 2008 -Change syntax format. allowed_container(array) abolished and container(string) adopted. -Fix POD 0.0.1 Sat Jul 12 15:33:25 2008 Initial release. ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/Makefile.PLlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/Make0000644000000000000000000000124011211506132030042 0ustar use strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'Syntax::Highlight::Engine::Simple::HTML', AUTHOR => 'Sugama Keita ', VERSION_FROM => 'lib/Syntax/Highlight/Engine/Simple/HTML.pm', ABSTRACT_FROM => 'lib/Syntax/Highlight/Engine/Simple/HTML.pm', PL_FILES => {}, PREREQ_PM => { 'Test::More' => 0, 'version' => 0, 'Syntax::Highlight::Engine::Simple' => '0.02', }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'Syntax-Highlight-Engine-Simple-HTML-*' }, ); ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/READMElibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/READ0000644000000000000000000000114711211506132027706 0ustar Syntax-Highlight-Engine-Simple-HTML version 0.0.1 This is a sub class of Syntax::Highlight::Engine::Simple. This is the Initial release and still experimental version. INSTALLATION To install this module, run the following commands: perl Makefile.PL make make test make install Alternatively, to install with Module::Build, you can use the following commands: perl Build.PL ./Build ./Build test ./Build install DEPENDENCIES None. COPYRIGHT AND LICENCE Copyright (C) 2008, Sugama Keita This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/META.ymllibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-HTML-0.02/META0000644000000000000000000000106611211506132027721 0ustar --- name: Syntax-Highlight-Engine-Simple-HTML version: 0.02 author: - 'Sugama Keita ' abstract: "(EXPERIMENTAL)HTML code highlighting class" license: perl requires: Syntax::Highlight::Engine::Simple: 0.02 Test::More: 0 version: 0 generated_by: Module::Build version 0.2808 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.2.html version: 1.2 provides: Syntax::Highlight::Engine::Simple::HTML: file: lib/Syntax/Highlight/Engine/Simple/HTML.pm version: 0.02 resources: license: http://dev.perl.org/licenses/ libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/0000755000000000000000000000000011212457451027415 5ustar ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/0000755000000000000000000000000011212457451030163 5ustar ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/Syntax/libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/0000755000000000000000000000000011212457451030163 5ustar ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/Syntax/Highlight/libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/0000755000000000000000000000000011212457451030163 5ustar ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/Syntax/Highlight/Engine/libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/0000755000000000000000000000000011212457451030163 5ustar ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/Syntax/Highlight/Engine/Simple/libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/0000755000000000000000000000000011212457451030163 5ustar ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/Syntax/Highlight/Engine/Simple/Perl.pmlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/lib/0000644000000000000000000002351011211506132030154 0ustar package Syntax::Highlight::Engine::Simple::Perl; use strict; use warnings; use base qw(Syntax::Highlight::Engine::Simple); #use version; our $VERSION = '0.02'; ### ---------------------------------------------------------------------------- ### set syntax ### ---------------------------------------------------------------------------- sub setSyntax { shift->{syntax} = [ { class => 'quote', regexp => '(? 'quote', regexp => '(? 'quote', regexp => q@'.*?(? 'wquote', regexp => '(? 'wquote', regexp => q@".*?(? 'comment', regexp => '(?m)#+.*?$', }, { class => 'variable', regexp => '[\$\@\%][\w\d:]+', }, { class => 'function', regexp => '\&[\w\d:]+', }, { class => 'method', regexp => '(?<=->)[\w\d:]+', }, { class => 'number', regexp => '\b\d+\b', }, { class => 'keyword', regexp => __PACKAGE__->array2regexp(&getStatementKeywords()), }, { class => 'keyword', regexp => __PACKAGE__->array2regexp(&getKeywords()), }, { class => 'regexp_statement', regexp => '(?<=(? 'regexp_statement', regexp => '(?<=(? 'regexp_statement', regexp => '/.+?/', }, { class => 'perlpod', regexp => '(?sm)^=.+?(^=cut$)', }, { class => 'keyword2', regexp => '(?m)^=.+$', container => 'perlpod', }, { class => 'statement', regexp => '(?m)^=\w+', container => 'keyword2', }, ]; } sub getStatementKeywords { return ( 'continue', 'foreach', 'require', 'package', 'scalar', 'format', 'unless', 'local', 'until', 'while', 'elsif', 'next', 'last', 'goto', 'else', 'redo', 'sub', 'for', 'use', 'our', 'no', 'if', 'my', 'qr', 'qx', # 'qq', # 'qw', # 'tr', # 'm', # 'q', # 's', # 'y' ); } sub getKeywords { return ( 'getprotobynumber', 'getprotobyname', 'gethostbyaddr', 'gethostbyname', 'getservbyname', 'getservbyport', 'getnetbyaddr', 'getnetbyname', 'endprotoent', 'getpeername', 'getpriority', 'getprotoent', 'getsockname', 'setpriority', 'setprotoent', 'endhostent', 'endservent', 'gethostent', 'getservent', 'getsockopt', 'sethostent', 'setservent', 'setsockopt', 'socketpair', 'endnetent', 'getnetent', 'localtime', 'prototype', 'quotemeta', 'rewinddir', 'setnetent', 'wantarray', 'closedir', 'dbmclose', 'endgrent', 'endpwent', 'formline', 'getgrent', 'getgrgid', 'getgrnam', 'getlogin', 'getpwent', 'getpwnam', 'getpwuid', 'readline', 'readlink', 'readpipe', 'setgrent', 'setpwent', 'shmwrite', 'shutdown', 'syswrite', 'truncate', 'binmode', 'connect', 'dbmopen', 'defined', 'getpgrp', 'getppid', 'lcfirst', 'opendir', 'readdir', 'reverse', 'seekdir', 'setpgrp', 'shmread', 'sprintf', 'symlink', 'syscall', 'sysopen', 'sysread', 'sysseek', 'telldir', 'ucfirst', 'unshift', 'waitpid', 'accept', 'caller', 'chroot', 'delete', 'exists', 'fileno', 'gmtime', 'import', 'length', 'listen', 'msgctl', 'msgget', 'msgrcv', 'msgsnd', 'printf', 'rename', 'return', 'rindex', 'select', 'semctl', 'semget', 'shmctl', 'shmget', 'socket', 'splice', 'substr', 'system', 'unlink', 'unpack', 'values', 'alarm', 'atan2', 'bless', 'break', 'chdir', 'chmod', 'chomp', 'chown', 'close', 'crypt', 'fcntl', 'flock', 'index', 'ioctl', 'lstat', 'mkdir', 'print', 'reset', 'rmdir', 'semop', 'shift', 'sleep', 'split', 'srand', 'study', 'times', 'umask', 'undef', 'untie', 'utime', 'write', 'bind', 'chop', 'dump', 'each', 'eval', 'exec', 'exit', 'fork', 'getc', 'glob', 'grep', 'join', 'keys', 'kill', 'link', 'open', 'pack', 'pipe', 'push', 'rand', 'read', 'recv', 'seek', 'send', 'sort', 'sqrt', 'stat', 'tell', 'tied', 'time', 'wait', 'warn', 'abs', 'chr', 'cos', 'die', 'eof', 'exp', 'hex', 'int', 'log', 'map', 'oct', 'ord', 'pop', 'pos', 'ref', 'sin', 'tie', 'do', 'vec', 'lc', 'uc', ); } return 1; __END__ =head1 NAME Syntax::Highlight::Engine::Simple::Perl - (EXPERIMENTAL) Perl code highlighting class =head1 VERSION This document describes Syntax::Highlight::Engine::Simple::Perl version 0.0.1 =head1 SYNOPSIS Constractor use Syntax::Highlight::Engine::Simple::Perl; $highlighter = Syntax::Highlight::Engine::Simple::Perl->new(); or use Syntax::Highlight::Engine::Simple; $highlighter = Syntax::Highlight::Engine::Simple->new(type => 'Perl'); Highlighting stage $highlighter->doStr( str => $str, tab_width => 4); $highlighter->doFile( str => $str, tab_width => 4, encode => 'utf8'); =head1 DESCRIPTION This is a sub class of Syntax::Highlight::Engine::Simple. A working example of This module is at bellow. http://jamadam.com/dev/cpan/demo/Syntax/Highlight/Engine/Simple/ =head1 INTERFACE =head2 new =over =item type File type. This argument causes specific sub class to be loaded. =back =head2 setParams =over =item html_escape_code_ref HTML escape code ref. Default subroutine escapes 3 charactors '&', '<' and '>'. =back =head2 appendSyntax Append syntax by giving a hash. =over $highlighter->setSyntax( syntax => { class => 'quote', regexp => "'.*?'", container => 'comment', } ); =back =head2 doStr Highlighting strings. $highlighter->doStr( str => $str, tab_width => 4 ); =over =item str String. =item tab_width Tab width for tab-space conversion. -1 for disable it. -1 is the defult. =back =head2 doFile Highlighting files. $highlighter->doStr( str => $str, tab_width => 4, encode => 'utf8' ); =over =item file File name. =item tab_width Tab width for tab-space conversion. -1 for disable it. -1 is the defult. =item encode Set the encode of file. utf8 is the default. =back =head2 array2regexp This is a utility method for converting string array to regular expression. =over =back =head2 getClassNames Returns the class names in array. =over =back =head2 setSyntax This is a method for initializing the syntax. It is called by constractor so you may not have to call it manually. =head2 getKeywords Returns Keyword array. =head2 getStatementKeywords Returns Perl Statement Keyword array. =head1 Example Here is a sample of CSS. pre.program_code span.keyword {color: #00f} pre.program_code span.keyword2 {color: #808} pre.program_code span.number {color: #f00} pre.program_code span.identifier {color: #a66} pre.program_code span.function {color: #a66; text-decoration: underline} pre.program_code span.method {color: #a66; text-decoration: underline} pre.program_code span.variable {color: #f80} pre.program_code span.statement {color: #00f} pre.program_code span.comment {color: #080} pre.program_code span.perlpod {color: #080} pre.program_code span.quote {color: #a66} pre.program_code span.wquote {color: #600} pre.program_code span.value {color: #a66} pre.program_code span.regexp_statement {background: #ffa} pre.program_code span.tag {color: #00f} pre.program_code span.url {color: #00f; text-decoration: underline} =head1 DIAGNOSTICS =over =item C<< doStr method got undefined value >> =item C<< File open failed >> =back =head1 CONFIGURATION AND ENVIRONMENT Syntax::Highlight::Engine::Simple::Perl requires no configuration files or environment variables. Specific language syntax can be defined with sub classes and loaded in constractor if you give it the type argument. =head1 DEPENDENCIES =over =item UNIVERSAL::require =item Syntax::Highlight::Engine::Simple =back =head1 INCOMPATIBILITIES None reported. =head1 BUGS AND LIMITATIONS No bugs have been reported. Please report any bugs or feature requests to C, or through the web interface at L. =head1 SEE ALSO =over =item L =back =head1 AUTHOR Sugama Keita C<< >> =head1 LICENCE AND COPYRIGHT Copyright (c) 2008, Sugama Keita C<< >>. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See I. =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. =cut libsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/t/0000755000000000000000000000000011212457451027660 5ustar ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/t/pod.tlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/t/po0000644000000000000000000000021411211506132030204 0ustar #!perl -T use Test::More; eval "use Test::Pod 1.14"; plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; all_pod_files_ok(); ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/t/00.load.tlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/t/000000644000000000000000000000031111211506132030003 0ustar use Test::More tests => 1; BEGIN { use_ok( 'Syntax::Highlight::Engine::Simple::Perl' ); } diag( "Testing Syntax::Highlight::Engine::Simple::Perl $Syntax::Highlight::Engine::Simple::Perl::VERSION" ); ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/t/pod-coverage.tlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/t/po0000644000000000000000000000025411211506132030210 0ustar #!perl -T use Test::More; eval "use Test::Pod::Coverage 1.04"; plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; all_pod_coverage_ok(); ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/t/highlight.tlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/t/hi0000644000000000000000000000564011211506132030176 0ustar use strict; use warnings; use Test::More tests => 1; use Syntax::Highlight::Engine::Simple::Perl; use encoding 'utf8'; binmode(STDIN, ":utf8"); binmode(STDOUT, ":utf8"); binmode(STDERR, ":utf8"); my $highlighter = Syntax::Highlight::Engine::Simple::Perl->new(); my $expected = ''; my $result = ''; ### ---------------------------------------------------------------------------- ### 1. Define syntax ### ---------------------------------------------------------------------------- is( $highlighter->doStr(str => <<'ORIGINAL'), $expected=<<'EXPECTED' ); #01 ### ---------------------------------------------------------------------------- ### constractor ### ---------------------------------------------------------------------------- sub new { my $class = shift; my $self = bless {type => undef, syntax => undef, @_}, $class; $self->setParams(@_); if ($self->{type}) { my $class = "Syntax::Highlight::Engine::Simple::". $self->{type}; $class->require or croak $@; no strict 'refs'; &{$class. "::setSyntax"}($self); return $self; } $self->setSyntax(); return $self; } ORIGINAL ### ---------------------------------------------------------------------------- ### constractor ### ---------------------------------------------------------------------------- sub new { my $class = shift; my $self = bless {type => undef, syntax => undef, @_}, $class; $self->setParams(@_); if ($self->{type}) { my $class = "Syntax::Highlight::Engine::Simple::". $self->{type}; $class->require or croak $@; no strict 'refs'; &{$class. "::setSyntax"}($self); return $self; } $self->setSyntax(); return $self; } EXPECTED ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/t/perlcritic.tlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/t/pe0000644000000000000000000000034311211506132030175 0ustar #!perl use strict; use Test::More; eval { require Test::Perl::Critic; Test::Perl::Critic->import(-profile => "t/perlcriticrc") }; plan skip_all => "Test::Perl::Critic is not installed." if $@; all_critic_ok("lib"); ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/t/perlcriticrclibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/t/pe0000644000000000000000000000011311211506132030170 0ustar # no strict 'refs' [TestingAndDebugging::ProhibitNoStrict] allow = refs ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/Build.PLlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/Buil0000644000000000000000000000107011211506132030217 0ustar use strict; use warnings; use Module::Build; my $builder = Module::Build->new( module_name => 'Syntax::Highlight::Engine::Simple::Perl', license => 'perl', dist_author => 'Sugama Keita ', dist_version_from => 'lib/Syntax/Highlight/Engine/Simple/Perl.pm', requires => { 'Test::More' => 0, 'version' => 0, 'Syntax::Highlight::Engine::Simple' => '0.02', }, add_to_cleanup => [ 'Syntax-Highlight-Engine-Simple-Perl-*' ], ); $builder->create_build_script(); ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/MANIFESTlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/MANI0000644000000000000000000000026211211506132030052 0ustar Build.PL Changes lib/Syntax/Highlight/Engine/Simple/Perl.pm Makefile.PL MANIFEST META.yml README t/00.load.t t/highlight.t t/perlcritic.t t/perlcriticrc t/pod-coverage.t t/pod.t ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/Changeslibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/Chan0000644000000000000000000000037411211506132030203 0ustar Revision history for Syntax-Highlight-Engine-Simple-Perl 0.0.2 Sat Jul 13 15:33:25 2008 -Change syntax format. allowed_container(array) abolished and container(string) adopted. -Fix POD 0.0.1 Sat Jul 12 15:33:20 2008 Initial release. ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/Makefile.PLlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/Make0000644000000000000000000000124011211506132030200 0ustar use strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'Syntax::Highlight::Engine::Simple::Perl', AUTHOR => 'Sugama Keita ', VERSION_FROM => 'lib/Syntax/Highlight/Engine/Simple/Perl.pm', ABSTRACT_FROM => 'lib/Syntax/Highlight/Engine/Simple/Perl.pm', PL_FILES => {}, PREREQ_PM => { 'Test::More' => 0, 'version' => 0, 'Syntax::Highlight::Engine::Simple' => '0.02', }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'Syntax-Highlight-Engine-Simple-Perl-*' }, ); ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/READMElibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/READ0000644000000000000000000000114711211506132030044 0ustar Syntax-Highlight-Engine-Simple-Perl version 0.0.1 This is a sub class of Syntax::Highlight::Engine::Simple. This is the Initial release and still experimental version. INSTALLATION To install this module, run the following commands: perl Makefile.PL make make test make install Alternatively, to install with Module::Build, you can use the following commands: perl Build.PL ./Build ./Build test ./Build install DEPENDENCIES None. COPYRIGHT AND LICENCE Copyright (C) 2008, Sugama Keita This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/META.ymllibsyntax-highlight-engine-simple-languages-perl-1/src/Syntax-Highlight-Engine-Simple-Perl-0.02/META0000644000000000000000000000106711211506132030060 0ustar --- name: Syntax-Highlight-Engine-Simple-Perl version: 0.02 author: - 'Sugama Keita ' abstract: "(EXPERIMENTAL) Perl code highlighting class" license: perl requires: Syntax::Highlight::Engine::Simple: 0.02 Test::More: 0 version: 0 generated_by: Module::Build version 0.2808 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.2.html version: 1.2 provides: Syntax::Highlight::Engine::Simple::Perl: file: lib/Syntax/Highlight/Engine/Simple/Perl.pm version: 0.02 resources: license: http://dev.perl.org/licenses/