HTML-Toc
view release on metacpan or search on metacpan
Revision history for Perl extension HTML::Toc.
2009-07-31 Freddy Vulto <fvulto@gmail.com>
Release 1.12
- Added Test::Differences to Makefile.PL
2009-04-13 Freddy Vulto <fvulto@gmail.com>
Release 1.11
- ToC insertion point doesn't match anymore if insertionPoint is a text
token within a ToC token.
- fix TocInsertor.pm to preserve surrounding text of ToC insertion point
- updated Makefile.PL to automatically do "SET PERLIO=perlio" on
MSWin32 (Dan Dascalescu)
- Test suite:
- switched tests to use Test::More and Test::Differences (Dan
Dascalescu)
- added separate test files `insertionPoint.t' and `anchors.t' (Dan
Dascalescu)
- added test "text and children passed to templateAnchorName" to
`generate.t' (Dan Dascalescu)
2008-12-12 Freddy Vulto <fvulto@gmail.com>
Release 1.10
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: HTML-Toc
version: 1.12
version_from: Toc.pm
installdirs: site
requires:
HTML::Parser: 0
Test::Differences: 0
distribution_type: module
generated_by: ExtUtils::MakeMaker version 6.30_01
Makefile.PL view on Meta::CPAN
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'HTML::Toc',
VERSION_FROM => 'Toc.pm',
AUTHOR => 'Freddy Vulto (fvulto@gmail.com)',
ABSTRACT => 'Generate, insert and update HTML Table of Contents',
PREREQ_PM => {'HTML::Parser' => 0, 'Test::Differences' => 0},
MAN3PODS => {},
);
package MY; # so that "SUPER" works right
sub test {
my $inherited = shift->SUPER::test(@_);
if ($^O eq 'MSWin32') {
$inherited =~ s/(?=\$\(FULLPERLRUN\))/SET PERLIO=perlio & /;
t/anchors.t view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use HTML::Toc;
use HTML::TocInsertor;
use HTML::Entities;
use Encode;
use Test::More tests => 7;
use Test::Differences;
# http://search.cpan.org/dist/HTML-Toc/Toc.pod#templateAnchorName
sub assembleAnchorName() {
my ($aFile, $aGroupId, $aLevel, $aNode, $text, $children) = @_;
if ($text !~ /^\s*$/) {
# generate a SEO-friendly anchor right from the token content
# The allowed character set is limited first by the URI specification for fragments, http://tools.ietf.org/html/rfc3986#section-2: characters
# then by the limitations of the values of 'id' and 'name' attributes: http://www.w3.org/TR/REC-html40/types.html#type-name
#--- format.t -----------------------------------------------------------------
# function: Test ToC formatting.
use strict;
use Test::More tests => 6;
use Test::Differences;
use HTML::Toc;
use HTML::TocGenerator;
use HTML::TocInsertor;
my ($output, $content, $filename);
my $toc = HTML::Toc->new;
my $tocGenerator = HTML::TocGenerator->new;
my $tocInsertor = HTML::TocInsertor->new;
t/generate.t view on Meta::CPAN
#--- generate.t ---------------------------------------------------------------
# function: Test ToC generation.
use strict;
use Test::More tests => 14;
use Test::Differences;
use HTML::Toc;
use HTML::TocGenerator;
my ($filename);
my $toc = HTML::Toc->new;
my $tocGenerator = HTML::TocGenerator->new;
$toc->setOptions({
'doLinkToToken' => 0,
#--- insert.t -----------------------------------------------------------------
# function: Test ToC insertion.
use strict;
use Test::More tests => 10;
use Test::Differences;
use HTML::Toc;
use HTML::TocGenerator;
use HTML::TocInsertor;
my ($output, $content, $filename);
my $toc = HTML::Toc->new;
my $tocGenerator = HTML::TocGenerator->new;
my $tocInsertor = HTML::TocInsertor->new;
t/insertionPoint.t view on Meta::CPAN
#!/usr/bin/perl -w
# HTML::TocInsertor tests
# http://search.cpan.org/dist/HTML-Toc/Toc.pod#HTML::TocInsertor::insert()
use strict;
use HTML::Toc;
use HTML::TocInsertor;
use Test::More tests => 5;
use Test::Differences;
my $toc = HTML::Toc->new();
my $tocInsertor = HTML::TocInsertor->new();
my $output;
#--- 1. insertionPoint not found ---------------------------------------
t/manualTest.t view on Meta::CPAN
#--- manual.t -----------------------------------------------------------------
# function: Test HTML::ToC generating a manual.
use strict;
use Test::More tests => 3;
use Test::Differences;
use HTML::Toc;
use HTML::TocGenerator;
use HTML::TocInsertor;
use HTML::TocUpdator;
#--- AssembleTocLine() --------------------------------------------------------
# function: Assemble ToC line.
t/options.t view on Meta::CPAN
#--- options.t ----------------------------------------------------------------
# function: Test HTML::ToC. In particular test the available options.
use strict;
use Test::More tests => 5;
use Test::Differences;
use HTML::Toc;
use HTML::TocGenerator;
use HTML::TocInsertor;
use HTML::TocUpdator;
my ($filename);
BEGIN {
# Create test file
t/podExamples.t view on Meta::CPAN
#--- podExamples.t ------------------------------------------------------------
# function: Test HTML::ToC. In particular test the examples as described in
# the POD documentation.
use strict;
use Test::More tests => 16;
use Test::Differences;
use HTML::Toc;
use HTML::TocGenerator;
use HTML::TocInsertor;
use HTML::TocUpdator;
my ($filename, $filename2);
BEGIN {
t/propagate.t view on Meta::CPAN
#--- propagate.t --------------------------------------------------------------
# function: Test ToC propagation.
use strict;
use Test::More tests => 10;
use Test::Differences;
use HTML::Toc;
use HTML::TocGenerator;
use HTML::TocInsertor;
my ($output, $content, $filename);
my $toc = HTML::Toc->new;
my $tocGenerator = HTML::TocGenerator->new;
my $tocInsertor = HTML::TocInsertor->new;
t/siteMap.t view on Meta::CPAN
#--- manual.t -----------------------------------------------------------------
# function: Test HTML::ToC generating a manual.
use strict;
use Test::More tests => 1;
use Test::Differences;
use Data::Dumper;
use File::Find;
use HTML::Toc;
use HTML::TocGenerator;
use HTML::TocInsertor;
use HTML::TocUpdator;
#--- update.t -----------------------------------------------------------------
# function: Test ToC updating.
use strict;
use Test::More tests => 6;
use Test::Differences;
use HTML::Toc;
use HTML::TocUpdator;
my ($output, $output2, $content, $filename);
my $toc = HTML::Toc->new;
my $tocUpdator = HTML::TocUpdator->new;
$toc->setOptions({
'doLinkToToken' => 1,
( run in 0.748 second using v1.01-cache-2.11-cpan-e1769b4cff6 )