cpan/Pod-Simple/t/corpus.t Pod::Simple test file
cpan/Pod-Simple/t/corpus/thai_iso11.txt Pod::Simple test file
cpan/Pod-Simple/t/corpus/thai_iso11.xml Pod::Simple test file
+cpan/Pod-Simple/t/emptylists.t Pod::Simple test file
cpan/Pod-Simple/t/encod01.t Pod::Simple test file
cpan/Pod-Simple/t/encod02.t Pod::Simple test file
cpan/Pod-Simple/t/encod03.t Pod::Simple test file
cpan/Pod-Simple/t/end_over.t Pod::Simple test file
+cpan/Pod-Simple/t/eol2.t Pod::Simple test file
+cpan/Pod-Simple/t/eol.t Pod::Simple test file
+cpan/Pod-Simple/t/fake-closers.t Pod::Simple test file
cpan/Pod-Simple/t/fcodes_e.t Pod::Simple test file
cpan/Pod-Simple/t/fcodes_l.t Pod::Simple test file
cpan/Pod-Simple/t/fcodes_s.t Pod::Simple test file
cpan/Pod-Simple/t/xhtml01.t Pod::Simple test file
cpan/Pod-Simple/t/xhtml05.t Pod::Simple test file
cpan/Pod-Simple/t/xhtml10.t Pod::Simple test file
+cpan/Pod-Simple/t/xhtml15.t Pod::Simple test file
cpan/Pod-Simple/t/x_nixer.t Pod::Simple test file
cpan/Sys-Syslog/Changes Changelog for Sys::Syslog
cpan/Sys-Syslog/fallback/const-c.inc Sys::Syslog constants fallback file
'Pod::Simple' =>
{
'MAINTAINER' => 'arandal',
- 'DISTRIBUTION' => 'DWHEELER/Pod-Simple-3.18.tar.gz',
+ 'DISTRIBUTION' => 'DWHEELER/Pod-Simple-3.19.tar.gz',
'FILES' => q[cpan/Pod-Simple],
'UPSTREAM' => 'cpan',
},
# ChangeLog for Pod::Simple dist
#---------------------------------------------------------------------------
+2011-08-23 David E. Wheeler <david@justatheory.org>
+ * Release 3.19
+
+ Fixed occasional test failure when tests are run in parallel
+ (HARNESS_OPTIONS=j6:c). Thanks to Alexei Znamensky for the report and
+ Marc Green for the fix.
+
+ Added "pod_handler" option. This is a callback that can be used to
+ inspect the content on a "=pod" line. Marc Green/Google Summer of
+ Code.
+
+ Added tests for proper line-ending parsing from the previous
+ release. The tests were in the repository, but didn't make it into
+ the MANIFEST or, therefore, the release. Reported by Marc Green.
+
+ Added the "parse_empty_lists" option. When enabled, Pod::Simple
+ will recognize empty lists (that is, a blocks with '=over' and
+ '=back' but nothing in between). Disabled by default. Marc
+ Green/Google Summer of Code.
+
+ Added the "whiteline_handler" attribute. It's much like
+ "code_handler", "cut_handler", and "pod_handler", except it's
+ triggered on lines that contain only whitespace characters. Marc
+ Green/Google Summer of Code.
+
+ Added "raw" attribute to L<> treelet that contains the L<>'s raw
+ contents. Marc Green/Google Summer of Code.
+
+ Pod directives autoclosed by Pod::Simple are now denoted as such
+ by the new "fake_closer" attribue. Marc Green/Google Summer of
+ Code.
+
+ Fixed incompatibility with Pod::Simple::HTMLBatch in
+ Pod::Simple::XHTML. Patch by Eric Johnson.
+
2011-07-16 David E. Wheeler <david@justatheory.org>
* Release 3.18
-=head1 Pod::Simple version 3.18
+=head1 Pod::Simple version 3.19
Pod::Simple is a Perl library for parsing text in the Pod ("plain old
documentation") markup language that is typically used for writing
);
@ISA = ('Pod::Simple::BlackBox');
-$VERSION = '3.18';
+$VERSION = '3.19';
@Known_formatting_codes = qw(I B C L E F S X Z);
%Known_formatting_codes = map(($_=>1), @Known_formatting_codes);
'codes_in_verbatim', # for PseudoPod extensions
'code_handler', # coderef to call when a code (non-pod) line is seen
- 'cut_handler', # coderef to call when a =cut line is seen
+ 'cut_handler', # ... when a =cut line is seen
+ 'pod_handler', # ... when a =pod line is seen
+ 'whiteline_handler', # ... when a line with only whitespace is seen
#Called like:
# $code_handler->($line, $self->{'line_count'}, $self) if $code_handler;
# $cut_handler->($line, $self->{'line_count'}, $self) if $cut_handler;
+ # $pod_handler->($line, $self->{'line_count'}, $self) if $pod_handler;
+ # $wl_handler->($line, $self->{'line_count'}, $self) if $wl_handler;
+ 'parse_empty_lists', # whether to acknowledge empty =over/=back blocks
);
# possibly a man page name (like "crontab(5)" is).
#
-############# Not implemented, I guess.
+############# The "raw" attribute that is already there.
# Sixth:
# The raw original L<...> content, before text is split on "|", "/", etc,
# and before E<...> codes are expanded.
DEBUG > 1 and print "Ogling E<$content>\n";
+ # XXX E<>'s contents *should* be a valid char in the scope of the current
+ # =encoding directive. Defaults to iso-8859-1, I believe. Fix this in the
+ # future sometime.
+
$charnum = Pod::Escapes::e2charnum($content);
DEBUG > 1 and print " Considering E<$content> with char ",
defined($charnum) ? $charnum : "undef", ".\n";
use strict;
use Carp ();
use vars qw($VERSION );
-$VERSION = '3.18';
+$VERSION = '3.19';
#use constant DEBUG => 7;
BEGIN {
require Pod::Simple;
my $code_handler = $self->{'code_handler'};
my $cut_handler = $self->{'cut_handler'};
+ my $wl_handler = $self->{'whiteline_handler'};
$self->{'line_count'} ||= 0;
my $scratch;
# TODO: add to docs: Note: this may cause cuts to be processed out
# of order relative to pods, but in order relative to code.
- } elsif($line =~ m/^\s*$/s) { # it's a blank line
+ } elsif($line =~ m/^(\s*)$/s) { # it's a blank line
+ if (defined $1 and $1 =~ /[^\S\r\n]/) { # it's a white line
+ $wl_handler->(map $_, $line, $self->{'line_count'}, $self)
+ if $wl_handler;
+ }
+
if(!$self->{'start_of_pod_block'} and @$paras and $paras->[-1][0] eq '~Verbatim') {
DEBUG > 1 and print "Saving blank line at line ${$self}{'line_count'}\n";
push @{$paras->[-1]}, $line;
if($para_type eq '=item') {
my $over;
- unless(@$curr_open and ($over = $curr_open->[-1])->[0] eq '=over') {
+ unless(@$curr_open and
+ $over = (grep { $_->[0] eq '=over' } @$curr_open)[-1]) {
$self->whine(
$para->[1]{'start_line'},
"'=item' outside of any '=over'"
$content =~ s/^\s+//s;
$content =~ s/\s+$//s;
DEBUG and print "Ogling '=end $content' directive\n";
-
+
unless(length($content)) {
$self->whine(
$para->[1]{'start_line'},
# what's that for?
$self->{'content_seen'} ||= 1;
- $self->_handle_element_end( my $scratch = 'for' );
+ $self->_handle_element_end( my $scratch = 'for', $para->[1]);
}
DEBUG > 1 and print "Popping $curr_open->[-1][0] $curr_open->[-1][1]{'target'} because of =end $content\n";
pop @$curr_open;
"=pod directives shouldn't be over one line long! Ignoring all "
. (@$para - 2) . " lines of content"
) if @$para > 3;
- # Content is always ignored.
+
+ # Content ignored unless 'pod_handler' is set
+ if (my $pod_handler = $self->{'pod_handler'}) {
+ my ($line_num, $line) = map $_, $para->[1]{'start_line'}, $para->[2];
+ $line = $line eq '' ? "=pod" : "=pod $line"; # imitate cut_handler output
+ $pod_handler->($line, $line_num, $self);
+ }
+
+ # The surrounding methods set content_seen, so let us remain consistent.
+ # I do not know why it was not here before -- should it not be here?
+ # $self->{'content_seen'} ||= 1;
+
return;
}
$list_type = $self->_get_initial_item_type($paras->[0]);
} elsif($paras->[0][0] eq '=back') {
- # Ignore empty lists. TODO: make this an option?
- shift @$paras;
- return 1;
-
+ # Ignore empty lists by default
+ if ($self->{'parse_empty_lists'}) {
+ $list_type = 'empty';
+ } else {
+ shift @$paras;
+ return 1;
+ }
} elsif($paras->[0][0] eq '~end') {
$self->whine(
$para->[1]{'start_line'},
#my $over = pop @$curr_open;
$self->{'content_seen'} ||= 1;
$self->_handle_element_end( my $scratch =
- 'over-' . ( (pop @$curr_open)->[1]{'~type'} )
+ 'over-' . ( (pop @$curr_open)->[1]{'~type'} ), $para->[1]
);
} else {
DEBUG > 1 and print "=back found without a matching =over. Stack: (",
sub _ponder_item {
my ($self,$para,$curr_open,$paras) = @_;
my $over;
- unless(@$curr_open and ($over = $curr_open->[-1])->[0] eq '=over') {
+ unless(@$curr_open and
+ $over = (grep { $_->[0] eq '=over' } @$curr_open)[-1]) {
$self->whine(
$para->[1]{'start_line'},
"'=item' outside of any '=over'"
$copy[-1] = '' unless defined $copy[-1];
# since =over's don't have targets
}
-
+
+ $copy[1]{'fake-closer'} = 1;
+
DEBUG and print "Queuing up fake-o event: ", pretty(\@copy), "\n";
unshift @closers, \@copy;
}
my @stack;
my @lineage = ($treelet);
+ my $raw = ''; # raw content of L<> fcode before splitting/processing
+ # XXX 'raw' is not 100% accurate: all surrounding whitespace is condensed
+ # into just 1 ' '. Is this the regex's doing or 'raw's?
+ my $inL = 0;
DEBUG > 4 and print "Paragraph:\n$para\n\n";
}
push @lineage, [ substr($1,0,1), {}, ]; # new node object
push @{ $lineage[-2] }, $lineage[-1];
-
+ if ('L' eq substr($1,0,1)) {
+ $raw = $inL ? $raw.$1 : ''; # reset raw content accumulator
+ $inL = 1;
+ } else {
+ $raw .= $1 if $inL;
+ }
+
} elsif(defined $4) {
DEBUG > 3 and print "Found apparent complex end-text code \"$3$4\"\n";
# This is where it gets messy...
pop @stack;
pop @lineage;
+
+ unless (@stack) { # not in an L if there are no open fcodes
+ $inL = 0;
+ if (ref $lineage[-1][-1] && $lineage[-1][-1][0] eq 'L') {
+ $lineage[-1][-1][1]{'raw'} = $raw
+ }
+ }
+ $raw .= $3.$4 if $inL;
} elsif(defined $5) {
DEBUG > 3 and print "Found apparent simple end-text code \"$5\"\n";
push @{ $lineage[-1] }, $5;
}
+ unless (@stack) { # not in an L if there are no open fcodes
+ $inL = 0;
+ if (ref $lineage[-1][-1] && $lineage[-1][-1][0] eq 'L') {
+ $lineage[-1][-1][1]{'raw'} = $raw
+ }
+ }
+ $raw .= $5 if $inL;
+
} elsif(defined $6) {
DEBUG > 3 and print "Found stuff \"$6\"\n";
push @{ $lineage[-1] }, $6;
-
+ $raw .= $6 if $inL;
+ # XXX does not capture multiplace whitespaces -- 'raw' ends up with
+ # at most 1 leading/trailing whitespace, why not all of it?
+
} else {
# should never ever ever ever happen
DEBUG and print "AYYAYAAAAA at line ", __LINE__, "\n";
"Unterminated $x sequence",
);
}
-
+
return $treelet;
}
use Pod::Simple::Methody ();
use Pod::Simple ();
use vars qw( @ISA $VERSION );
-$VERSION = '3.18';
+$VERSION = '3.19';
@ISA = ('Pod::Simple::Methody');
BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG)
? \&Pod::Simple::DEBUG
package Pod::Simple::Debug;
use strict;
use vars qw($VERSION );
-$VERSION = '3.18';
+$VERSION = '3.19';
sub import {
my($value,$variable);
require 5;
package Pod::Simple::DumpAsText;
-$VERSION = '3.18';
+$VERSION = '3.19';
use Pod::Simple ();
BEGIN {@ISA = ('Pod::Simple')}
require 5;
package Pod::Simple::DumpAsXML;
-$VERSION = '3.18';
+$VERSION = '3.19';
use Pod::Simple ();
BEGIN {@ISA = ('Pod::Simple')}
$Doctype_decl $Content_decl
);
@ISA = ('Pod::Simple::PullParser');
-$VERSION = '3.18';
+$VERSION = '3.19';
BEGIN {
if(defined &DEBUG) { } # no-op
use vars qw( $VERSION $HTML_RENDER_CLASS $HTML_EXTENSION
$CSS $JAVASCRIPT $SLEEPY $SEARCH_CLASS @ISA
);
-$VERSION = '3.18';
+$VERSION = '3.19';
@ISA = (); # Yup, we're NOT a subclass of Pod::Simple::HTML!
# TODO: nocontents stylesheets. Strike some of the color variations?
package Pod::Simple::LinkSection;
# Based somewhat dimly on Array::Autojoin
use vars qw($VERSION );
-$VERSION = '3.18';
+$VERSION = '3.19';
use strict;
use Pod::Simple::BlackBox;
use vars qw($VERSION );
-$VERSION = '3.18';
+$VERSION = '3.19';
use overload( # So it'll stringify nice
'""' => \&Pod::Simple::BlackBox::stringify_lol,
use strict;
use Pod::Simple ();
use vars qw(@ISA $VERSION);
-$VERSION = '3.18';
+$VERSION = '3.19';
@ISA = ('Pod::Simple');
# Yes, we could use named variables, but I want this to be impose
( $_[0]->can( 'end_' . $_[1] )
|| return
)->(
- $_[0]
+ $_[0], $_[2]
);
}
require 5;
package Pod::Simple::Progress;
-$VERSION = '3.18';
+$VERSION = '3.19';
use strict;
# Objects of this class are used for noting progress of an
require 5;
package Pod::Simple::PullParser;
-$VERSION = '3.18';
+$VERSION = '3.19';
use Pod::Simple ();
BEGIN {@ISA = ('Pod::Simple')}
use strict;
use vars qw(@ISA $VERSION);
@ISA = ('Pod::Simple::PullParserToken');
-$VERSION = '3.18';
+$VERSION = '3.19';
sub new { # Class->new(tagname);
my $class = shift;
use strict;
use vars qw(@ISA $VERSION);
@ISA = ('Pod::Simple::PullParserToken');
-$VERSION = '3.18';
+$VERSION = '3.19';
sub new { # Class->new(tagname, optional_attrhash);
my $class = shift;
use strict;
use vars qw(@ISA $VERSION);
@ISA = ('Pod::Simple::PullParserToken');
-$VERSION = '3.18';
+$VERSION = '3.19';
sub new { # Class->new(text);
my $class = shift;
package Pod::Simple::PullParserToken;
# Base class for tokens gotten from Pod::Simple::PullParser's $parser->get_token
@ISA = ();
-$VERSION = '3.18';
+$VERSION = '3.19';
use strict;
sub new { # Class->new('type', stuff...); ## Overridden in derived classes anyway
use strict;
use vars qw($VERSION @ISA %Escape $WRAP %Tagmap);
-$VERSION = '3.18';
+$VERSION = '3.19';
use Pod::Simple::PullParser ();
BEGIN {@ISA = ('Pod::Simple::PullParser')}
use strict;
use vars qw($VERSION $MAX_VERSION_WITHIN $SLEEPY);
-$VERSION = '3.18'; ## Current version of this package
+$VERSION = '3.19'; ## Current version of this package
BEGIN { *DEBUG = sub () {0} unless defined &DEBUG; } # set DEBUG level
use Carp ();
use Carp ();
use Pod::Simple ();
use vars qw( $ATTR_PAD @ISA $VERSION $SORT_ATTRS);
-$VERSION = '3.18';
+$VERSION = '3.19';
BEGIN {
@ISA = ('Pod::Simple');
*DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG;
}
sub _handle_element_end {
- my($parser, $element_name) = @_;
+ my($parser, $element_name, $attr_hash_r) = @_;
+ # NOTE: $attr_hash_r is only present when $element_name is "over" or "begin"
+ # The remaining code excerpts will mostly ignore this $attr_hash_r, as it is
+ # mostly useless. It is documented where "over-*" and "begin" events are
+ # documented.
...
}
When a LE<lt>I<some_url>E<gt> code is parsed, it produces this event
structure:
- <L content-implicit="yes" to="that_url" type="url">
+ <L content-implicit="yes" raw="that_url" to="that_url" type="url">
that_url
</L>
produces this event structure:
- <L content-implicit="yes" to="http://www.perl.com/CPAN/authors/" type="url">
+ <L content-implicit="yes" raw="http://www.perl.com/CPAN/authors/" to="http://www.perl.com/CPAN/authors/" type="url">
http://www.perl.com/CPAN/authors/
</L>
When a LE<lt>I<manpage(section)>E<gt> code is parsed (and these are
fairly rare and not terribly useful), it produces this event structure:
- <L content-implicit="yes" to="manpage(section)" type="man">
+ <L content-implicit="yes" raw="manpage(section)" to="manpage(section)" type="man">
manpage(section)
</L>
produces this event structure:
- <L content-implicit="yes" to="crontab(5)" type="man">
+ <L content-implicit="yes" raw="crontab(5)" to="crontab(5)" type="man">
crontab(5)
</L>
will produce this event structure:
- <L content-implicit="yes" section="ENVIRONMENT" to="crontab(5)" type="man">
+ <L content-implicit="yes" raw="crontab(5)/"ENVIRONMENT"" section="ENVIRONMENT" to="crontab(5)" type="man">
"ENVIRONMENT" in crontab(5)
</L>
will produce this event structure:
- <L to="crontab(5)" type="man">
+ <L raw="hell itself!|crontab(5)" to="crontab(5)" type="man">
hell itself!
</L>
In the most common case, the simple case of a LE<lt>podpageE<gt> code
produces this event structure:
- <L content-implicit="yes" to="podpage" type="pod">
+ <L content-implicit="yes" raw="podpage" to="podpage" type="pod">
podpage
</L>
produces this event structure:
- <L content-implicit="yes" to="Net::Ping" type="pod">
+ <L content-implicit="yes" raw="Net::Ping" to="Net::Ping" type="pod">
Net::Ping
</L>
produces this event structure:
- <L to="perldiag" type="pod">
+ <L raw="Perl Error Messages|perldiag" to="perldiag" type="pod">
Perl Error Messages
</L>
produces this event structure:
- <L content-implicit="yes" section="Member Data" type="pod">
+ <L content-implicit="yes" raw="/"Member Data"" section="Member Data" type="pod">
"Member Data"
</L>
produces this event structure:
- <L section="Member Data" type="pod">
+ <L raw="the various attributes|/"Member Data"" section="Member Data" type="pod">
the various attributes
</L>
produces this event structure:
- <L content-implicit="yes" section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">
+ <L content-implicit="yes" raw="perlsyn/"Basic BLOCKs and Switch Statements"" section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">
"Basic BLOCKs and Switch Statements" in perlsyn
</L>
produces this event structure:
- <L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">
+ <L raw="SWITCH statements|perlsyn/"Basic BLOCKs and Switch Statements"" section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">
SWITCH statements
</L>
L</Member Data>
L<Member Data> [deprecated syntax]
-That is, they all produce the same event structure, namely:
+That is, they all produce the same event structure (for the most part), namely:
- <L content-implicit="yes" section="Member Data" type="pod">
+ <L content-implicit="yes" raw="$depends_on_syntax" section="Member Data" type="pod">
"Member Data"
</L>
+The I<raw> attribute depends on what the raw content of the L<> is, so that is
+why the event structure is the same "for the most part".
+
+If you have not guessed it yet, the I<raw> attribute contains the raw,
+original, unescaped content of the L<> formatting code. In addition to the
+examples above, take notice of the following event structure produced by
+the following L<> formatting code.
+
+ L<click B<here>|page/About the C<-M> switch>
+
+ <L raw="click B<here>|page/About the C<-M> switch" section="About the -M switch" to="page" type="pod">
+ click B<here>
+ </L>
+
+Specifically, notice that the formatting codes are present and unescaped
+in I<raw>.
+
+There is a known bug in the I<raw> attribute where any surrounding whitespace
+is condensed into a single ' '. For example, given LE<60> linkE<62>, I<raw>
+will be " link".
+
=item events with an element_name of E or Z
While there are Pod codes EE<lt>...E<gt> and ZE<lt>E<gt>, these
...Stuff...
</item-bullet>
...more item-bullets...
- </over-bullet>
+ </over-bullet fake-closer="1">
+
+The attribute I<fake-closer> is only present if it is a true value; it is not
+present if it is a false value. It is shown in the above example to illustrate
+where the attribute is (in the B<closing> tag). It signifies that the C<=over>
+did not have a matching C<=back>, and thus Pod::Simple had to create a fake
+closer.
+
+For example, this Pod source:
+
+ =over
+
+ =item *
+
+ Something
+
+ =back
+
+Would produce an event structure that does B<not> have the I<fake-closer>
+attribute, whereas this Pod source:
+
+ =over
+
+ =item *
+
+ Gasp! An unclosed =over block!
+
+would. The rest of the over-* examples will not demonstrate this attribute,
+but they all can have it. See L<Pod::Checker>'s source for an example of this
+attribute being used.
The value of the I<indent> attribute is whatever value is after the
"=over" directive, as in "=over 8". If no such value is specified
=item events with an element_name of over-text
-These events are are somewhat unlike the other over-*
+These events are somewhat unlike the other over-*
structures, as far as what their contents are. When
an "=over ... Z<>=back" block is parsed where the items are
a list of text "subheadings", it will produce this event structure:
...more item-text and/or stuff...
</over-text>
-The I<indent> attribute is as with the other over-* events.
+The I<indent> and I<fake-closer> attributes are as with the other over-* events.
For example, this Pod source:
=item events with an element_name of over-block
-These events are are somewhat unlike the other over-*
+These events are somewhat unlike the other over-*
structures, as far as what their contents are. When
an "=over ... Z<>=back" block is parsed where there are no items,
it will produce this event structure:
...stuff (generally Para or Verbatim elements)...
</over-block>
-The I<indent> attribute is as with the other over-* events.
+The I<indent> and I<fake-closer> attributes are as with the other over-* events.
For example, this Pod source:
circumstances of cruelty and perfidy scarcely paralleled in the most
barbarous ages, and totally unworthy the head of a civilized nation.
- =cut
+ =back
will produce this event structure:
</Para>
</over-block>
+=item events with an element_name of over-empty
+
+B<Note: These events are only triggered if C<parse_empty_lists()> is set to a
+true value.>
+
+These events are somewhat unlike the other over-* structures, as far as what
+their contents are. When an "=over ... Z<>=back" block is parsed where there
+is no content, it will produce this event structure:
+
+ <over-empty indent="4" start_line="543">
+ </over-empty>
+
+The I<indent> and I<fake-closer> attributes are as with the other over-* events.
+
+For example, this Pod source:
+
+ =over
+
+ =over
+
+ =back
+
+ =back
+
+will produce this event structure:
+
+ <over-block indent="4" start_line="1">
+ <over-empty indent="4" start_line="3">
+ </over-empty>
+ </over-block>
+
+Note that the outer C<=over> is a block because it has no C<=item>s but still
+has content: the inner C<=over>. The inner C<=over>, in turn, is completely
+empty, and is treated as such.
+
=item events with an element_name of item-bullet
See L</"events with an element_name of over-bullet">, above.
unlikely to be interesting, but this is included for completeness.
+=item C<< $parser->pod_handler( I<CODE_REF> ) >>
+
+This is just like the code_handler attribute, except that it's for
+"=pod" lines, not code lines. The same caveats apply. "=pod" lines are
+unlikely to be interesting, but this is included for completeness.
+
+
+=item C<< $parser->whiteline_handler( I<CODE_REF> ) >>
+
+This is just like the code_handler attribute, except that it's for
+lines that are seemingly blank but have whitespace (" " and/or "\t") on them,
+not code lines. The same caveats apply. These lines are unlikely to be
+interesting, but this is included for completeness.
+
+
=item C<< $parser->whine( I<linenumber>, I<complaint string> ) >>
This notes a problem in the Pod, which will be reported to in the "Pod
This is primarily useful for output formats that treat whitespace as
significant (such as text or *roff, but not HTML).
-=back
+=item C<< $parser->parse_empty_lists( I<SOMEVALUE> ) >>
+
+If this attribute is set to true, the parser will not ignore empty
+C<=over>/C<=back> blocks. The type of C<=over> will be I<empty>, documented
+above, L<events with an element_name of over-empty>.
+=back
=head1 SEE ALSO
use Pod::Simple::Methody ();
use Pod::Simple ();
use vars qw( @ISA $VERSION $FREAKYMODE);
-$VERSION = '3.18';
+$VERSION = '3.19';
@ISA = ('Pod::Simple::Methody');
BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG)
? \&Pod::Simple::DEBUG
use Carp ();
use Pod::Simple ();
use vars qw( @ISA $VERSION );
-$VERSION = '3.18';
+$VERSION = '3.19';
@ISA = ('Pod::Simple');
sub new {
use Symbol ('gensym');
use Carp ();
use vars qw($VERSION );
-$VERSION = '3.18';
+$VERSION = '3.19';
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
require 5;
package Pod::Simple::Transcode;
use vars qw($VERSION );
-$VERSION = '3.18';
+$VERSION = '3.19';
BEGIN {
if(defined &DEBUG) {;} # Okay
package Pod::Simple::TranscodeDumb;
use strict;
use vars qw($VERSION %Supported);
-$VERSION = '3.18';
+$VERSION = '3.19';
# This module basically pretends it knows how to transcode, except
# only for null-transcodings! We use this when Encode isn't
# available.
use Pod::Simple;
require Encode;
use vars qw($VERSION );
-$VERSION = '3.18';
+$VERSION = '3.19';
sub is_dumb {0}
sub is_smart {1}
package Pod::Simple::XHTML;
use strict;
use vars qw( $VERSION @ISA $HAS_HTML_ENTITIES );
-$VERSION = '3.18';
+$VERSION = '3.19';
use Pod::Simple::Methody ();
@ISA = ('Pod::Simple::Methody');
$doctype = $self->html_doctype || '';
$title = $self->force_title || $self->title || $self->default_title || '';
$metatags = $self->html_header_tags || '';
- if ($self->html_css) {
- $metatags .= "\n<link rel='stylesheet' href='" .
- $self->html_css . "' type='text/css' />";
+ if (my $css = $self->html_css) {
+ $metatags .= $css;
+ if ($css !~ /<link/) {
+ # this is required to be compatible with Pod::Simple::BatchHTML
+ $metatags .= '<link rel="stylesheet" href="'
+ . $self->encode_entities($css) . '" type="text/css" />';
+ }
}
if ($self->html_javascript) {
- $metatags .= "\n<script type='text/javascript' src='" .
+ $metatags .= qq{\n<script type="text/javascript" src="} .
$self->html_javascript . "'></script>";
}
$bodyid = $self->backlink ? ' id="_podtop_"' : '';
return $self;
}
+sub html_header_after_title {
+}
+
+
1;
__END__
use Carp ();
use Pod::Simple ();
use vars qw( $ATTR_PAD @ISA $VERSION $SORT_ATTRS);
-$VERSION = '3.18';
+$VERSION = '3.19';
BEGIN {
@ISA = ('Pod::Simple');
*DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG;
sub {
$_[0]->code_handler(sub { $more .= $_[1] . ":" . $_[0] . "\n" } );
$_[0]->cut_handler( sub { $more .= "~" . $_[1] . ":" . $_[0]. "\n" } );
+ $_[0]->pod_handler( sub { $more .= "+" . $_[1] . ":" . $_[0]. "\n" } );
+ $_[0]->whiteline_handler(
+ sub { $more .= "=" . $_[1] . ":" . $_[0]. "\n" } );
} => join "\n",
- "",
+ " ", # space outside pod
"\t# This is handy...",
+ "=pod text",
+ "\t", # tab inside pod
+ "=cut more text",
+ "\t", # tab outside pod
+ "=pod",
+ " \t ", # spaces and tabs inside pod
"=head1 I LIKE PIE",
- "",
+ " ", # space inside pod
"=cut",
"use Test::Harness;",
"runtests(sort glob 't/*.t');",
}
ok scalar($got = $more), scalar($exp = join "\n" =>
- "1:",
+ "1: ",
"2:\t# This is handy...",
- "~5:=cut",
- "6:use Test::Harness;",
- "7:runtests(sort glob 't/*.t');",
- "8:",
+ "=4:\t",
+ "+3:=pod text",
+ "~5:=cut more text",
+ "6:\t",
+ "=8: \t ",
+ "+7:=pod",
+ "=10: ",
+ "~11:=cut",
+ "12:use Test::Harness;",
+ "13:runtests(sort glob 't/*.t');",
+ "14:",
"",
);
unless($got eq $exp) {
--- /dev/null
+BEGIN {
+ if($ENV{PERL_CORE}) {
+ chdir 't';
+ @INC = '../lib';
+ }
+}
+
+use strict;
+use Test;
+BEGIN { plan tests => 5 };
+
+ok 1;
+
+use Pod::Simple::XMLOutStream;
+print "# Pod::Simple version $Pod::Simple::VERSION\n";
+
+my $x = 'Pod::Simple::XMLOutStream';
+$Pod::Simple::XMLOutStream::ATTR_PAD = ' ';
+$Pod::Simple::XMLOutStream::SORT_ATTRS = 1; # for predictably testable output
+
+sub on {shift->parse_empty_lists(1)}
+sub off {shift->parse_empty_lists(0)}
+
+my $pod = <<POD;
+=over
+
+=over
+
+=over
+
+=over
+
+=back
+
+=over
+
+=back
+
+=back
+
+=back
+
+=back
+POD
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+print "# Testing default behavior (parse_empty_lists( FALSE )) ...\n";
+
+ok( $x->_out($pod),
+ '<Document><over-block indent="4"><over-block indent="4"><over-block indent="4"></over-block></over-block></over-block></Document>'
+);
+
+print "# Testing explicit parse_empty_lists( FALSE ) ...\n";
+
+ok( $x->_out(\&off, $pod),
+ '<Document><over-block indent="4"><over-block indent="4"><over-block indent="4"></over-block></over-block></over-block></Document>'
+);
+
+print "# Testing parse_empty_lists( TRUE ) ...\n";
+
+ok( $x->_out(\&on, $pod),
+ '<Document><over-block indent="4"><over-block indent="4"><over-block indent="4"><over-empty indent="4"></over-empty><over-empty indent="4"></over-empty></over-block></over-block></over-block></Document>'
+);
+
+print "# Wrapping up... one for the road...\n";
+ok 1;
+print "# --- Done with ", __FILE__, " --- \n";
--- /dev/null
+#!/usr/bin/perl
+
+# t/eol.t - check handling of \r, \n, and \r\n as line separators
+
+BEGIN {
+ chdir 't' if -d 't';
+}
+
+use warnings;
+use strict;
+use lib '../lib';
+use Test::More tests => 7;
+
+use_ok('Pod::Simple::XHTML') or exit;
+
+open(POD, ">$$.pod") or die "$$.pod: $!";
+print POD <<__EOF__;
+=pod
+
+=head1 NAME
+
+crlf
+
+=head1 DESCRIPTION
+
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+
+ crlf crlf crlf crlf
+ crlf crlf crlf crlf
+ crlf crlf crlf crlf
+
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+
+=cut
+__EOF__
+close(POD);
+
+# --- CR ---
+
+my $p1 = Pod::Simple::XHTML->new ();
+isa_ok ($p1, 'Pod::Simple::XHTML');
+
+open(POD, "<$$.pod") or die "$$.pod: $!";
+open(IN, ">$$.in") or die "$$.in: $!";
+while (<POD>) {
+ s/[\r\n]+/\r/g;
+ print IN $_;
+}
+close(POD);
+close(IN);
+
+$p1->output_string(\my $o1);
+$p1->parse_file("$$.in");
+
+# --- LF ---
+
+my $p2 = Pod::Simple::XHTML->new ();
+isa_ok ($p2, 'Pod::Simple::XHTML');
+
+open(POD, "<$$.pod") or die "$$.pod: $!";
+open(IN, ">$$.in") or die "$$.in: $!";
+while (<POD>) {
+ s/[\r\n]+/\n/g;
+ print IN $_;
+}
+close(POD);
+close(IN);
+
+$p2->output_string(\my $o2);
+$p2->parse_file("$$.in");
+
+# --- CRLF ---
+
+my $p3 = Pod::Simple::XHTML->new ();
+isa_ok ($p3, 'Pod::Simple::XHTML');
+
+open(POD, "<$$.pod") or die "$$.pod: $!";
+open(IN, ">$$.in") or die "$$.in: $!";
+while (<POD>) {
+ s/[\r\n]+/\r\n/g;
+ print IN $_;
+}
+close(POD);
+close(IN);
+
+$p3->output_string(\my $o3);
+$p3->parse_file("$$.in");
+
+# --- now test ---
+
+my $cksum1 = unpack("%32C*", $o1);
+my $cksum2 = unpack("%32C*", $o2);
+my $cksum3 = unpack("%32C*", $o3);
+
+ok($cksum1 == $cksum2, "CR vs LF");
+ok($cksum1 == $cksum3, "CR vs CRLF");
+ok($cksum2 == $cksum3, "LF vs CRLF");
+
+END {
+ 1 while unlink("$$.pod", "$$.in");
+}
--- /dev/null
+#!/usr/bin/perl
+
+# t/eol2.t - check handling of \r, \n, and \r\n as line separators (again)
+
+BEGIN {
+ chdir 't' if -d 't';
+}
+
+use warnings;
+use strict;
+use lib '../lib';
+use Test::More tests => 7;
+
+use_ok('Pod::Simple::XHTML') or exit;
+
+open(POD, ">$$.pod") or die "$$.pod: $!";
+print POD <<__EOF__;
+=pod
+
+=head1 NAME
+
+crlf
+
+=head1 DESCRIPTION
+
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+
+ crlf crlf crlf crlf
+ crlf crlf crlf crlf
+ crlf crlf crlf crlf
+
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
+
+=cut
+__EOF__
+close(POD);
+
+# --- CR ---
+
+my $p1 = Pod::Simple::XHTML->new ();
+isa_ok ($p1, 'Pod::Simple::XHTML');
+
+open(POD, "<$$.pod") or die "$$.pod: $!";
+my $i1 = '';
+while (<POD>) {
+ s/[\r\n]+/\r/g;
+ $i1 .= $_;
+}
+close(POD);
+
+$p1->output_string(\my $o1);
+$p1->parse_string_document($i1);
+
+# --- LF ---
+
+my $p2 = Pod::Simple::XHTML->new ();
+isa_ok ($p2, 'Pod::Simple::XHTML');
+
+open(POD, "<$$.pod") or die "$$.pod: $!";
+my $i2 = '';
+while (<POD>) {
+ s/[\r\n]+/\n/g;
+ $i2 .= $_;
+}
+close(POD);
+
+$p2->output_string(\my $o2);
+$p2->parse_string_document($i2);
+
+# --- CRLF ---
+
+my $p3 = Pod::Simple::XHTML->new ();
+isa_ok ($p3, 'Pod::Simple::XHTML');
+
+open(POD, "<$$.pod") or die "$$.pod: $!";
+my $i3 = '';
+while (<POD>) {
+ s/[\r\n]+/\r\n/g;
+ $i3 .= $_;
+}
+close(POD);
+
+$p3->output_string(\my $o3);
+$p3->parse_string_document($i3);
+
+# --- now test ---
+
+my $cksum1 = unpack("%32C*", $o1);
+my $cksum2 = unpack("%32C*", $o2);
+my $cksum3 = unpack("%32C*", $o3);
+
+ok($cksum1 == $cksum2, "CR vs LF");
+ok($cksum1 == $cksum3, "CR vs CRLF");
+ok($cksum2 == $cksum3, "LF vs CRLF");
+
+END {
+ 1 while unlink("$$.pod", "$$.in");
+}
--- /dev/null
+BEGIN {
+ if($ENV{PERL_CORE}) {
+ chdir 't';
+ @INC = '../lib';
+ }
+}
+
+use strict;
+use Test::More;
+use Data::Dumper;
+BEGIN { plan tests => 9 };
+
+ok 1;
+
+my $i = 0;
+
+print "# Real closers ...\n";
+
+for my $pod ( "=over\n\nblock\n\n=back",
+ "=over\n\nblock\n\n=cut\n\ncode\n\n=pod\n\n=back",
+ "=begin html\n\ntag\n\n=end html",
+ ) {
+ my $parser = Pod::Simple::Blurb->new();
+ $parser->parse_string_document($pod);
+ is($parser->{'closer-flag'}, -1, "real closer ". ++$i);
+}
+
+$i = 0;
+
+print "# Fake closers ...\n";
+
+for my $pod ("=begin html\n\ntag=cut",
+ "=begin html\n\ntag\n\n=begin xml tag =end xml",
+ "=over\n\nblock=cut",
+ "=over\n\nanother block",
+ ) {
+ my $parser = Pod::Simple::Blurb->new();
+ $parser->parse_string_document($pod);
+ is($parser->{'closer-flag'}, 1, "fake closer ". ++$i);
+}
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+print "# Wrapping up... one for the road...\n";
+ok 1;
+print "# --- Done with ", __FILE__, " --- \n";
+
+1;
+
+package Pod::Simple::Blurb;
+use warnings;
+use strict;
+use base qw/Pod::Simple::Methody/;
+
+sub new {
+ my $new = shift->SUPER::new(@_);
+ $new->output_string(\my $doesnotmatter);
+ $new->accept_targets('*');
+ return $new;
+}
+
+sub end_over_block {
+ shift->set(@_);
+}
+sub end_for {
+ shift->set(@_);
+}
+
+sub set {
+ $_[0]{'closer-flag'} = defined $_[1]{'fake-closer'} ? 1 : -1;
+}
print "# Simple/moderate L<stuff> tests...\n";
ok($x->_out(qq{=pod\n\nL<Net::Ping>\n}),
- '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="Net::Ping" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
);
ok($x->_out(qq{=pod\n\nL<crontab(5)>\n}),
- '<Document><Para><L content-implicit="yes" to="crontab(5)" type="man">crontab(5)</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="crontab(5)" to="crontab(5)" type="man">crontab(5)</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Net::Ping/Ping-pong>\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="Net::Ping/Ping-pong" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Net::Ping/"Ping-pong">\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="Net::Ping/"Ping-pong"" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</"Object Methods">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/"Object Methods"" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</Object Methods>\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/Object Methods" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<"Object Methods">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw=""Object Methods"" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
print "# Ents in the middle...\n";
ok($x->_out(qq{=pod\n\nL<Net::Ping>\n}),
- '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="Net::Ping" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Net::Ping/Ping-E<112>ong>\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="Net::Ping/Ping-E<112>ong" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Net::Ping/"Ping-E<112>ong">\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="Net::Ping/"Ping-E<112>ong"" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</"Object E<77>ethods">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/"Object E<77>ethods"" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</Object E<77>ethods>\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/Object E<77>ethods" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<"Object E<77>ethods">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw=""Object E<77>ethods"" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
print "# Ents in the middle and at the start...\n";
ok($x->_out(qq{=pod\n\nL<E<78>et::Ping>\n}),
- '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="E<78>et::Ping" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<E<78>et::Ping/Ping-E<112>ong>\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="E<78>et::Ping/Ping-E<112>ong" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<E<78>et::Ping/"Ping-E<112>ong">\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="E<78>et::Ping/"Ping-E<112>ong"" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</"E<79>bject E<77>ethods">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/"E<79>bject E<77>ethods"" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</E<79>bject E<77>ethods>\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/E<79>bject E<77>ethods" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<"E<79>bject E<77>ethods">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw=""E<79>bject E<77>ethods"" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
print "# Ents in the middle and at the start and at the end...\n";
ok($x->_out(qq{=pod\n\nL<E<78>et::PinE<103>>\n}),
- '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="E<78>et::PinE<103>" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<E<78>et::PinE<103>/Ping-E<112>onE<103>>\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="E<78>et::PinE<103>/Ping-E<112>onE<103>" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<E<78>et::PinE<103>/"Ping-E<112>onE<103>">\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="E<78>et::PinE<103>/"Ping-E<112>onE<103>"" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</"E<79>bject E<77>ethodE<115>">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/"E<79>bject E<77>ethodE<115>"" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</E<79>bject E<77>ethodE<115>>\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/E<79>bject E<77>ethodE<115>" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<"E<79>bject E<77>ethodE<115>">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw=""E<79>bject E<77>ethodE<115>"" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
print "# Ents in the middle...\n";
ok($x->_out(qq{=pod\n\nL<Net::Ping>\n}),
- '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="Net::Ping" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Net::Ping/Ping-E<112>ong>\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="Net::Ping/Ping-E<112>ong" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Net::Ping/"Ping-E<112>ong">\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="Net::Ping/"Ping-E<112>ong"" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</"Object E<77>ethods">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/"Object E<77>ethods"" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</Object E<77>ethods>\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/Object E<77>ethods" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<"Object E<77>ethods">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw=""Object E<77>ethods"" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>'
);
ok($x->_out(qq{=pod\n\nL<Net::Ping>\n}),
- '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="Net::Ping" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Net::Ping/Ping-B<E<112>ong>>\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="Net::Ping/Ping-B<E<112>ong>" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Net::Ping/"Ping-B<E<112>ong>">\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="Net::Ping/"Ping-B<E<112>ong>"" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</"B<Object> E<77>ethods">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/"B<Object> E<77>ethods"" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</B<Object> E<77>ethods>\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/B<Object> E<77>ethods" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<"B<Object> E<77>ethods">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw=""B<Object> E<77>ethods"" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
);
print "# Ents in the middle and at the start...\n";
ok($x->_out(qq{=pod\n\nL<E<78>et::Ping>\n}),
- '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="E<78>et::Ping" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<E<78>et::Ping/Ping-B<E<112>ong>>\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="E<78>et::Ping/Ping-B<E<112>ong>" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<E<78>et::Ping/"Ping-B<E<112>ong>">\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="E<78>et::Ping/"Ping-B<E<112>ong>"" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</"B<E<79>bject> E<77>ethods">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/"B<E<79>bject> E<77>ethods"" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</B<E<79>bject> E<77>ethods>\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/B<E<79>bject> E<77>ethods" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<"B<E<79>bject> E<77>ethods">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw=""B<E<79>bject> E<77>ethods"" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
);
print "# Ents in the middle and at the start and at the end...\n";
ok($x->_out(qq{=pod\n\nL<E<78>et::PinE<103>>\n}),
- '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="E<78>et::PinE<103>" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<E<78>et::PinE<103>/Ping-B<E<112>onE<103>>>\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="E<78>et::PinE<103>/Ping-B<E<112>onE<103>>" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<E<78>et::PinE<103>/"Ping-B<E<112>onE<103>>">\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="E<78>et::PinE<103>/"Ping-B<E<112>onE<103>>"" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</"B<E<79>bject> E<77>ethodE<115>">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/"B<E<79>bject> E<77>ethodE<115>"" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL</B<E<79>bject> E<77>ethodE<115>>\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="/B<E<79>bject> E<77>ethodE<115>" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<"B<E<79>bject> E<77>ethodE<115>">\n}),
- '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw=""B<E<79>bject> E<77>ethodE<115>"" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>'
);
print "#\n# L<url> tests...\n";
ok( $x->_out(qq{=pod\n\nL<news:comp.lang.perl.misc>\n}),
- '<Document><Para><L content-implicit="yes" to="news:comp.lang.perl.misc" type="url">news:comp.lang.perl.misc</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="news:comp.lang.perl.misc" to="news:comp.lang.perl.misc" type="url">news:comp.lang.perl.misc</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<http://www.perl.com>\n}),
- '<Document><Para><L content-implicit="yes" to="http://www.perl.com" type="url">http://www.perl.com</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="http://www.perl.com" to="http://www.perl.com" type="url">http://www.perl.com</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/>\n}),
- '<Document><Para><L content-implicit="yes" to="http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/" type="url">http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/" to="http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/" type="url">http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/</L></Para></Document>'
);
print "# L<url> tests with entities...\n";
ok( $x->_out(qq{=pod\n\nL<news:compE<46>lang.perl.misc>\n}),
- '<Document><Para><L content-implicit="yes" to="news:comp.lang.perl.misc" type="url">news:comp.lang.perl.misc</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="news:compE<46>lang.perl.misc" to="news:comp.lang.perl.misc" type="url">news:comp.lang.perl.misc</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<http://wwwE<46>perl.com>\n}),
- '<Document><Para><L content-implicit="yes" to="http://www.perl.com" type="url">http://www.perl.com</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="http://wwwE<46>perl.com" to="http://www.perl.com" type="url">http://www.perl.com</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<http://wwwE<46>perl.com/CPAN/authors/id/S/SB/SBURKE/>\n}),
- '<Document><Para><L content-implicit="yes" to="http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/" type="url">http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="http://wwwE<46>perl.com/CPAN/authors/id/S/SB/SBURKE/" to="http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/" type="url">http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<http://wwwE<46>perl.com/CPAN/authors/id/S/SB/SBURKEE<47>>\n}),
- '<Document><Para><L content-implicit="yes" to="http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/" type="url">http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="http://wwwE<46>perl.com/CPAN/authors/id/S/SB/SBURKEE<47>" to="http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/" type="url">http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/</L></Para></Document>'
);
print "# L<text|stuff> tests...\n";
ok($x->_out(qq{=pod\n\nL<things|crontab(5)>\n}),
- '<Document><Para><L to="crontab(5)" type="man">things</L></Para></Document>'
+ '<Document><Para><L raw="things|crontab(5)" to="crontab(5)" type="man">things</L></Para></Document>'
);
ok($x->_out(qq{=pod\n\nL<things|crontab(5)/ENVIRONMENT>\n}),
- '<Document><Para><L section="ENVIRONMENT" to="crontab(5)" type="man">things</L></Para></Document>'
+ '<Document><Para><L raw="things|crontab(5)/ENVIRONMENT" section="ENVIRONMENT" to="crontab(5)" type="man">things</L></Para></Document>'
);
ok($x->_out(qq{=pod\n\nL<things|crontab(5)/"ENVIRONMENT">\n}),
- '<Document><Para><L section="ENVIRONMENT" to="crontab(5)" type="man">things</L></Para></Document>'
+ '<Document><Para><L raw="things|crontab(5)/"ENVIRONMENT"" section="ENVIRONMENT" to="crontab(5)" type="man">things</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Perl Error Messages|perldiag>\n}),
- '<Document><Para><L to="perldiag" type="pod">Perl Error Messages</L></Para></Document>'
+ '<Document><Para><L raw="Perl Error Messages|perldiag" to="perldiag" type="pod">Perl Error Messages</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Perl\nError\nMessages|perldiag>\n}),
- '<Document><Para><L to="perldiag" type="pod">Perl Error Messages</L></Para></Document>'
+ '<Document><Para><L raw="Perl Error Messages|perldiag" to="perldiag" type="pod">Perl Error Messages</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Perl\nError\t Messages|perldiag>\n}),
- '<Document><Para><L to="perldiag" type="pod">Perl Error Messages</L></Para></Document>'
+ '<Document><Para><L raw="Perl Error Messages|perldiag" to="perldiag" type="pod">Perl Error Messages</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<SWITCH statements|perlsyn/"Basic BLOCKs and Switch Statements">\n}),
- '<Document><Para><L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH statements</L></Para></Document>'
+ '<Document><Para><L raw="SWITCH statements|perlsyn/"Basic BLOCKs and Switch Statements"" section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH statements</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<SWITCH statements|perlsyn/Basic BLOCKs and Switch Statements>\n}),
- '<Document><Para><L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH statements</L></Para></Document>'
+ '<Document><Para><L raw="SWITCH statements|perlsyn/Basic BLOCKs and Switch Statements" section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH statements</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<the various attributes|/"Member Data">\n}),
- '<Document><Para><L section="Member Data" type="pod">the various attributes</L></Para></Document>'
+ '<Document><Para><L raw="the various attributes|/"Member Data"" section="Member Data" type="pod">the various attributes</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<the various attributes|/Member Data>\n}),
- '<Document><Para><L section="Member Data" type="pod">the various attributes</L></Para></Document>'
+ '<Document><Para><L raw="the various attributes|/Member Data" section="Member Data" type="pod">the various attributes</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<the various attributes|"Member Data">\n}),
- '<Document><Para><L section="Member Data" type="pod">the various attributes</L></Para></Document>'
+ '<Document><Para><L raw="the various attributes|"Member Data"" section="Member Data" type="pod">the various attributes</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Perl B<Error E<77>essages>|perldiag>\n}),
- '<Document><Para><L to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>'
+ '<Document><Para><L raw="Perl B<Error E<77>essages>|perldiag" to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Perl\nB<Error\nE<77>essages>|perldiag>\n}),
- '<Document><Para><L to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>'
+ '<Document><Para><L raw="Perl B<Error E<77>essages>|perldiag" to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<Perl\nB<Error\t E<77>essages>|perldiag>\n}),
- '<Document><Para><L to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>'
+ '<Document><Para><L raw="Perl B<Error E<77>essages>|perldiag" to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<SWITCH B<E<115>tatements>|perlsyn/"Basic I<BLOCKs> and Switch StatementE<115>">\n}),
- '<Document><Para><L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L></Para></Document>'
+ '<Document><Para><L raw="SWITCH B<E<115>tatements>|perlsyn/"Basic I<BLOCKs> and Switch StatementE<115>"" section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<SWITCH B<E<115>tatements>|perlsyn/Basic I<BLOCKs> and Switch StatementE<115>>\n}),
- '<Document><Para><L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L></Para></Document>'
+ '<Document><Para><L raw="SWITCH B<E<115>tatements>|perlsyn/Basic I<BLOCKs> and Switch StatementE<115>" section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<the F<various> attributes|/"Member Data">\n}),
- '<Document><Para><L section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>'
+ '<Document><Para><L raw="the F<various> attributes|/"Member Data"" section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<the F<various> attributes|/Member Data>\n}),
- '<Document><Para><L section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>'
+ '<Document><Para><L raw="the F<various> attributes|/Member Data" section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<the F<various> attributes|"Member Data">\n}),
- '<Document><Para><L section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>'
+ '<Document><Para><L raw="the F<various> attributes|"Member Data"" section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<< Perl B<<< Error E<77>essages >>>|perldiag >>\n}),
- '<Document><Para><L to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>'
+ '<Document><Para><L raw="Perl B<<< Error E<77>essages >>>|perldiag" to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<< Perl\nB<<< Error\nE<77>essages >>>|perldiag >>\n}),
- '<Document><Para><L to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>'
+ '<Document><Para><L raw="Perl B<<< Error E<77>essages >>>|perldiag" to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<< Perl\nB<<< Error\t E<77>essages >>>|perldiag >>\n}),
- '<Document><Para><L to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>'
+ '<Document><Para><L raw="Perl B<<< Error E<77>essages >>>|perldiag" to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<< SWITCH B<<< E<115>tatements >>>|perlsyn/"Basic I<<<< BLOCKs >>>> and Switch StatementE<115>" >>\n}),
- '<Document><Para><L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L></Para></Document>'
+ '<Document><Para><L raw="SWITCH B<<< E<115>tatements >>>|perlsyn/"Basic I<<<< BLOCKs >>>> and Switch StatementE<115>"" section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<< SWITCH B<<< E<115>tatements >>>|perlsyn/Basic I<<<< BLOCKs >>>> and Switch StatementE<115> >>\n}),
- '<Document><Para><L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L></Para></Document>'
+ '<Document><Para><L raw="SWITCH B<<< E<115>tatements >>>|perlsyn/Basic I<<<< BLOCKs >>>> and Switch StatementE<115>" section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<<< the F<< various >> attributes|/"Member Data" >>>\n}),
- '<Document><Para><L section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>'
+ '<Document><Para><L raw="the F<< various >> attributes|/"Member Data"" section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<<< the F<< various >> attributes|/Member Data >>>\n}),
- '<Document><Para><L section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>'
+ '<Document><Para><L raw="the F<< various >> attributes|/Member Data" section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>'
);
ok( $x->_out(qq{=pod\n\nL<<< the F<< various >> attributes|"Member Data" >>>\n}),
- '<Document><Para><L section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>'
+ '<Document><Para><L raw="the F<< various >> attributes|"Member Data"" section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>'
);
###########################################################################
ok( $x->_out(qq{=pod\n\nI like L<< Perl B<<< Error E<77>essages >>>|perldiag >>.\n}),
- '<Document><Para>I like <L to="perldiag" type="pod">Perl <B>Error Messages</B></L>.</Para></Document>'
+ '<Document><Para>I like <L raw="Perl B<<< Error E<77>essages >>>|perldiag" to="perldiag" type="pod">Perl <B>Error Messages</B></L>.</Para></Document>'
);
ok( $x->_out(qq{=pod\n\nI like L<< Perl\nB<<< Error\nE<77>essages >>>|perldiag >>.\n}),
- '<Document><Para>I like <L to="perldiag" type="pod">Perl <B>Error Messages</B></L>.</Para></Document>'
+ '<Document><Para>I like <L raw="Perl B<<< Error E<77>essages >>>|perldiag" to="perldiag" type="pod">Perl <B>Error Messages</B></L>.</Para></Document>'
);
ok( $x->_out(qq{=pod\n\nI like L<< Perl\nB<<< Error\t E<77>essages >>>|perldiag >>.\n}),
- '<Document><Para>I like <L to="perldiag" type="pod">Perl <B>Error Messages</B></L>.</Para></Document>'
+ '<Document><Para>I like <L raw="Perl B<<< Error E<77>essages >>>|perldiag" to="perldiag" type="pod">Perl <B>Error Messages</B></L>.</Para></Document>'
);
ok( $x->_out(qq{=pod\n\nI like L<< SWITCH B<<< E<115>tatements >>>|perlsyn/"Basic I<<<< BLOCKs >>>> and Switch StatementE<115>" >>.\n}),
- '<Document><Para>I like <L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L>.</Para></Document>'
+ '<Document><Para>I like <L raw="SWITCH B<<< E<115>tatements >>>|perlsyn/"Basic I<<<< BLOCKs >>>> and Switch StatementE<115>"" section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L>.</Para></Document>'
);
ok( $x->_out(qq{=pod\n\nI like L<< SWITCH B<<< E<115>tatements >>>|perlsyn/Basic I<<<< BLOCKs >>>> and Switch StatementE<115> >>.\n}),
- '<Document><Para>I like <L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L>.</Para></Document>'
+ '<Document><Para>I like <L raw="SWITCH B<<< E<115>tatements >>>|perlsyn/Basic I<<<< BLOCKs >>>> and Switch StatementE<115>" section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L>.</Para></Document>'
);
ok( $x->_out(qq{=pod\n\nI like L<<< the F<< various >> attributes|/"Member Data" >>>.\n}),
- '<Document><Para>I like <L section="Member Data" type="pod">the <F>various</F> attributes</L>.</Para></Document>'
+ '<Document><Para>I like <L raw="the F<< various >> attributes|/"Member Data"" section="Member Data" type="pod">the <F>various</F> attributes</L>.</Para></Document>'
);
ok( $x->_out(qq{=pod\n\nI like L<<< the F<< various >> attributes|/Member Data >>>.\n}),
- '<Document><Para>I like <L section="Member Data" type="pod">the <F>various</F> attributes</L>.</Para></Document>'
+ '<Document><Para>I like <L raw="the F<< various >> attributes|/Member Data" section="Member Data" type="pod">the <F>various</F> attributes</L>.</Para></Document>'
);
ok( $x->_out(qq{=pod\n\nI like L<<< the F<< various >> attributes|"Member Data" >>>.\n}),
- '<Document><Para>I like <L section="Member Data" type="pod">the <F>various</F> attributes</L>.</Para></Document>'
+ '<Document><Para>I like <L raw="the F<< various >> attributes|"Member Data"" section="Member Data" type="pod">the <F>various</F> attributes</L>.</Para></Document>'
);
ok( $x->_out(qq{=pod\n\nI like L<<< B<text>s|http://text.com >>>.\n}),
-'<Document><Para>I like <L to="http://text.com" type="url"><B>text</B>s</L>.</Para></Document>'
+'<Document><Para>I like <L raw="B<text>s|http://text.com" to="http://text.com" type="url"><B>text</B>s</L>.</Para></Document>'
);
ok( $x->_out(qq{=pod\n\nI like L<<< text|https://text.com/1/2 >>>.\n}),
-'<Document><Para>I like <L to="https://text.com/1/2" type="url">text</L>.</Para></Document>'
+'<Document><Para>I like <L raw="text|https://text.com/1/2" to="https://text.com/1/2" type="url">text</L>.</Para></Document>'
);
ok( $x->_out(qq{=pod\n\nI like L<<< I<text>|http://text.com >>>.\n}),
-'<Document><Para>I like <L to="http://text.com" type="url"><I>text</I></L>.</Para></Document>'
+'<Document><Para>I like <L raw="I<text>|http://text.com" to="http://text.com" type="url"><I>text</I></L>.</Para></Document>'
);
ok( $x->_out(qq{=pod\n\nI like L<<< C<text>|http://text.com >>>.\n}),
-'<Document><Para>I like <L to="http://text.com" type="url"><C>text</C></L>.</Para></Document>'
+'<Document><Para>I like <L raw="C<text>|http://text.com" to="http://text.com" type="url"><C>text</C></L>.</Para></Document>'
);
ok( $x->_out(qq{=pod\n\nI like L<<< I<tI<eI<xI<t>>>>|mailto:earlE<64>text.com >>>.\n}),
-'<Document><Para>I like <L to="mailto:earl@text.com" type="url"><I>t<I>e<I>x<I>t</I></I></I></I></L>.</Para></Document>'
+'<Document><Para>I like <L raw="I<tI<eI<xI<t>>>>|mailto:earlE<64>text.com" to="mailto:earl@text.com" type="url"><I>t<I>e<I>x<I>t</I></I></I></I></L>.</Para></Document>'
);
ok( $x->_out(qq{=pod\n\nI like L<<< textZ<>|http://text.com >>>.\n}),
-'<Document><Para>I like <L to="http://text.com" type="url">text</L>.</Para></Document>'
+'<Document><Para>I like <L raw="textZ<>|http://text.com" to="http://text.com" type="url">text</L>.</Para></Document>'
);
"=pod\n\nI like bric-a-bracE<160>aE<160>gogo.\n",
));
&ok(
- map {my $z = $_; $z =~ s/content-implicit="yes" //g; $z }
+ map {my $z = $_; $z =~ s/content-implicit="yes" //g; $z =~ s/raw=".+?" //g; $z }
$x->_duo( sub { $_[0]->nbsp_for_S(1) },
qq{=pod\n\nI like S<L</"bric-a-brac a gogo">>.\n},
qq{=pod\n\nI like L<"bric-a-bracE<160>aE<160>gogo"|/"bric-a-brac a gogo">.\n},
));
-&ok( $x->_duo( sub { $_[0]->nbsp_for_S(1) },
+&ok(
+ map {my $z = $_; $z =~ s/raw=".+?" //g; $z }
+ $x->_duo( sub { $_[0]->nbsp_for_S(1) },
qq{=pod\n\nI like S<L<Stuff like that|"bric-a-brac a gogo">>.\n},
qq{=pod\n\nI like L<StuffE<160>likeE<160>that|"bric-a-brac a gogo">.\n},
));
&ok(
- map {my $z = $_; $z =~ s/content-implicit="yes" //g; $z }
+ map {my $z = $_; $z =~ s/content-implicit="yes" //g; $z =~ s/raw=".+?" //g; $z }
$x->_duo( sub { $_[0]->nbsp_for_S(1) },
qq{=pod\n\nI like S<L<Stuff I<like that>|"bric-a-brac a gogo">>.\n},
qq{=pod\n\nI like L<StuffE<160>I<likeE<160>that>|"bric-a-brac a gogo">.\n},
###### Now with recurse(0)
-print "# Testing the surveying of a current directory without recursing...\n";
+print "# Testing the surveying of a subdirectory with recursing off...\n";
$x->recurse(0);
-($name2where, $where2name) = $x->survey($cwd);
+($name2where, $where2name) = $x->survey(
+ File::Spec->catdir($cwd, 't', 'testlib2'));
$p = pretty( $where2name, $name2where )."\n";
$p =~ s/, +/,\n/g;
{
my $names = join "|", sort values %$where2name;
-ok $names, "";
+ok $names, "Suzzle";
}
{
my $names = join "|", sort keys %$name2where;
-ok $names, "";
+ok $names, "Suzzle";
}
-ok( ($name2where->{'squaa'} || 'huh???'), 'huh???');
+ok( ($name2where->{'Vliff'} || 'huh???'), 'huh???');
-ok grep( m/squaa\.pm/, keys %$where2name ), 0;
+ok grep( m/Vliff\.pm/, keys %$where2name ), 0;
ok 1;
# Now the scary bits... with L's!
print "# A wee L<...> sanity test...\n";
ok( Pod::Simple::XMLOutStream->_out(qq{=pod\n\nL<E<78>et::Ping/Ping-E<112>ong>\n}),
- '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
+ '<Document><Para><L content-implicit="yes" raw="E<78>et::Ping/Ping-E<112>ong" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>'
);
print "# Now a wee L<...> with mergy...\n";
'<Document>',
' <Para>',
- ' <L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">',
+ ' <L content-implicit="yes" raw="E<78>et::Ping/Ping-E<112>ong" section="Ping-pong" to="Net::Ping" type="pod">',
' "Ping-pong" in Net::Ping',
' </L>',
' </Para>',
A plain paragraph with body tags and css tags turned on.
EOPOD
-like($results, qr/<link rel='stylesheet' href='style.css' type='text\/css' \/>/,
+like($results, qr/<link rel="stylesheet" href="style.css" type="text\/css" \/>/,
"adding html body tags and css tags");
--- /dev/null
+#!/usr/bin/perl -w
+
+# t/xhtml15.t - test compatibility between Pod::Simple::XHTML and
+# Pod::Simple::HtmlBatch
+
+use strict;
+use warnings;
+use lib 'lib';
+use Test::More;
+
+use_ok('Pod::Simple::XHTML') or exit;
+
+my ($parser, $results);
+
+initialize();
+my $style = 'http://amazingpants.com/style.css';
+$parser->html_css($style);
+$parser->parse_string_document( '=head1 Foo' );
+like $results, qr/ href="$style" /, 'CSS is correct when link is passed in';
+
+initialize();
+my $link = qq{<link rel="stylesheet" href="$style" type="text/css">};
+$parser->html_css($link);
+$parser->parse_string_document( '=head1 Foo' );
+like $results, qr/ href="$style" /, 'CSS is correct when <link> is passed in';
+
+#note('These methods are called when XHTML is used by HtmlBatch');
+can_ok $parser, qw/batch_mode_page_object_init html_header_after_title/;
+
+done_testing;
+
+sub initialize {
+ $parser = Pod::Simple::XHTML->new;
+ $parser->index(1);
+ $parser->output_string( \$results );
+ $results = '';
+}
support negative zero, so the resulting object was actually malformed
[perl #95530].
+=item *
+
+L<Pod::Simple> has been upgraded from version 3.18 to 3.19.
+
=back
=head2 Removed Modules and Pragmata