package Pod::Checker;
use vars qw($VERSION);
-$VERSION = 1.098; ## Current version of this package
+$VERSION = 1.2; ## Current version of this package
require 5.005; ## requires this Perl version or later
use Pod::ParseUtils; ## for hyperlinks and lists
=item B<-warnings> =E<gt> I<val>
-Turn warnings on/off. See L<"Warnings">.
+Turn warnings on/off. I<val> is usually 1 for on, but higher values
+trigger additional warnings. See L<"Warnings">.
=back
to such things, so this is flagged. B<vi> users switch on the B<list>
option to avoid this problem.
+=begin _disabled_
+
=item * file does not start with =head
The file starts with a different POD directive than head.
This is most probably something you do not want.
+=end _disabled_
+
=item * No numeric argument for =over
The C<=over> command is supposed to have a numeric argument (the
Angle brackets not written as C<E<lt>ltE<gt>> and C<E<lt>gtE<gt>>
can potentially cause errors as they could be misinterpreted as
-markup commands.
+markup commands. This is only printed when the -warnings level is
+greater than 1.
=item * Unknown entity
with the script/module name, followed by a dash `-' and a very short
description of what the thing is good for.
-=item * Hyperlinks
+=back
+
+=head2 Hyperlinks
+
+There are some warnings wrt. malformed hyperlinks.
+
+=over 4
+
+=item * collapsing newlines to blanks
+
+A hyperlink LE<lt>...E<gt> spans more than one line. This may indicate
+and error.
-There are some warnings wrt. hyperlinks:
-Leading/trailing whitespace, newlines in hyperlinks,
-brackets C<()>.
+=item * ignoring leading/trailing whitespace in link
+
+There is whitespace at the beginning or the end of the contents of
+LE<lt>...E<gt>.
+
+=item * (section) in '$page' deprecated
+
+There is a section detected in the page name of LE<lt>...E<gt>, e.g.
+C<LE<gt>passwd(2)E<gt>>. POD hyperlinks may point to POD documents only.
+Please write C<CE<lt>passwd(2)E<gt>> instead. Some formatters are able
+to expand this to appropriate code. For links to (builtin) functions,
+please say C<LE<lt>perlfunc/mkdirE<gt>>, without ().
+
+=item * alternative text/node '%s' contains non-escaped | or /
+
+The characters C<|> and C</> are special in the LE<lt>...E<gt> context.
+Although the hyperlink parser does its best to determine which "/" is
+text and which is a delimiter in case of doubt, one ought to escape
+these literal characters like this:
+
+ / E<sol>
+ | E<verbar>
=back
use Carp;
use Exporter;
use Pod::Parser;
-require VMS::Filespec if $^O eq 'VMS';
use vars qw(@ISA @EXPORT);
@ISA = qw(Pod::Parser);
## Now create a pod checker
my $checker = new Pod::Checker(%options);
- $checker->parseopts(-process_cut_cmd => 1, -warnings => 1);
## Now check the pod document for errors
$checker->parse_from_file($infile, $outfile);
## Method definitions begin here
##-------------------------------
+##################################
+
+=over 4
+
+=item C<Pod::Checker-E<gt>new( %options )>
+
+Return a reference to a new Pod::Checker object that inherits from
+Pod::Parser and is used for calling the required methods later. The
+following options are recognized:
+
+C<-warnings =E<gt> num>
+ Print warnings if C<num> is true. The higher the value of C<num>,
+the more warnings are printed. Currently there are only levels 1 and 2.
+
+C<-quiet =E<gt> num>
+ If C<num> is true, do not print any errors/warnings. This is useful
+when Pod::Checker is used to munge POD code into plain text from within
+POD formatters.
+
+=cut
+
## sub new {
## my $this = shift;
## my $class = ref($this) || $this;
## Initialize number of errors, and setup an error function to
## increment this number and then print to the designated output.
$self->{_NUM_ERRORS} = 0;
- $self->errorsub('poderror'); # set the error handling subroutine
+ $self->{-quiet} ||= 0;
+ # set the error handling subroutine
+ $self->errorsub($self->{-quiet} ? sub { 1; } : 'poderror');
$self->{_commands} = 0; # total number of POD commands encountered
$self->{_list_stack} = []; # stack for nested lists
$self->{_have_begin} = ''; # stores =begin
# print warnings?
$self->{-warnings} = 1 unless(defined $self->{-warnings});
$self->{_current_head1} = ''; # the current =head1 block
+ $self->parseopts(-process_cut_cmd => 1, -warnings => $self->{-warnings});
}
##################################
-=over 4
-
=item C<$checker-E<gt>poderror( @args )>
=item C<$checker-E<gt>poderror( {%opts}, @args )>
sub poderror {
my $self = shift;
my %opts = (ref $_[0]) ? %{shift()} : ();
- $opts{-file} = VMS::Filespec::unixify($opts{-file}) if (exists($opts{-file}) && $^O eq 'VMS');
## Retrieve options
chomp( my $msg = ($opts{-msg} || "")."@_" );
## Increment error count and print message "
++($self->{_NUM_ERRORS})
if(!%opts || ($opts{-severity} && $opts{-severity} eq 'ERROR'));
- my $out_fh = $self->output_handle();
+ my $out_fh = $self->output_handle() || \*STDERR;
print $out_fh ($severity, $msg, $line, $file, "\n")
if($self->{-warnings} || !%opts || $opts{-severity} ne 'WARNING');
}
## print the number of errors found
my $self = shift;
my $infile = $self->input_file();
- $infile = VMS::Filespec::unixify($infile) if $^O eq 'VMS';
my $out_fh = $self->output_handle();
if(@{$self->{_list_stack}}) {
my %nodes;
foreach($self->node()) {
$nodes{$_} = 1;
- if(/^(\S+)\s+/) {
+ if(/^(\S+)\s+\S/) {
# we have more than one word. Use the first as a node, too.
# This is used heavily in perlfunc.pod
$nodes{$1} ||= 2; # derived node
}
}
+ foreach($self->idx()) {
+ $nodes{$_} = 3; # index node
+ }
foreach($self->hyperlink()) {
my ($line,$link) = @$_;
# _TODO_ what if there is a link to the page itself by the name,
$self->poderror({ -line => $line, -file => $file, -severity => 'ERROR',
-msg => "Unknown command '$cmd'" });
}
- else {
- # found a valid command
- if(!$self->{_commands}++ && $cmd !~ /^head/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => "file does not start with =head" });
- }
- ## check syntax of particular command
+ else { # found a valid command
+ $self->{_commands}++; # delete this line if below is enabled again
+
+ ##### following check disabled due to strong request
+ #if(!$self->{_commands}++ && $cmd !~ /^head/) {
+ # $self->poderror({ -line => $line, -file => $file,
+ # -severity => 'WARNING',
+ # -msg => "file does not start with =head" });
+ #}
+
+ # check syntax of particular command
if($cmd eq 'over') {
# check for argument
$arg = $self->interpolate_and_check($paragraph, $line,$file);
unless(ref) {
my $count;
# count the unescaped angle brackets
+ # complain only when warning level is greater than 1
my $i = $_;
if($count = $i =~ tr/<>/<>/) {
$self->poderror({ -line => $line, -file => $file,
-severity => 'WARNING',
-msg => "$count unescaped <> in paragraph" })
- if($self->{-warnings});
+ if($self->{-warnings} && $self->{-warnings}>1);
}
$text .= $i;
next;
package Pod::Find;
use vars qw($VERSION);
-$VERSION = 0.12; ## Current version of this package
-require 5.005; ## requires this Perl version or later
+$VERSION = 0.21; ## Current version of this package
+require 5.005; ## requires this Perl version or later
+use Carp;
#############################################################################
print "podname=",simplify_name('a/b/c/mymodule.pod'),"\n";
+ $location = pod_where( { -inc => 1 }, "Pod::Find" );
+
=head1 DESCRIPTION
-B<Pod::Find> provides a function B<pod_find> that searches for POD
-documents in a given set of files and directories. It returns a hash
-with the file names as keys and the POD name as value. The POD name
-is derived from the file name and its position in the directory tree.
+B<Pod::Find> provides a set of functions to locate POD files. Note that
+no function is exported by default to avoid pollution of your namespace,
+so be sure to specify them in the B<use> statement if you need them:
+
+ use Pod::Find qw(pod_find);
+
+=cut
+
+use strict;
+#use diagnostics;
+use Exporter;
+use File::Spec;
+use File::Find;
+use Cwd;
+
+use vars qw(@ISA @EXPORT_OK $VERSION);
+@ISA = qw(Exporter);
+@EXPORT_OK = qw(&pod_find &simplify_name &pod_where &contains_pod);
+
+# package global variables
+my $SIMPLIFY_RX;
+
+=head2 C<pod_find( { %opts } , @directories )>
+
+The function B<pod_find> searches for POD documents in a given set of
+files and/or directories. It returns a hash with the file names as keys
+and the POD name as value. The POD name is derived from the file name
+and its position in the directory tree.
E.g. when searching in F<$HOME/perl5lib>, the file
F<$HOME/perl5lib/MyModule.pm> would get the POD name I<MyModule>,
is found, e.g. F<CPAN.pm> in different directories. This usually
indicates duplicate occurrences of modules in the I<@INC> search path.
-The function B<simplify_name> is equivalent to B<basename>, but also
-strips Perl-like extensions (.pm, .pl, .pod) and extensions like
-F<.bat>, F<.cmd> on Win32 and OS/2, respectively.
-
-Note that neither B<pod_find> nor B<simplify_name> are exported by
-default so be sure to specify them in the B<use> statement if you need
-them:
-
- use Pod::Find qw(pod_find simplify_name);
-
-=head1 OPTIONS
-
-The first argument for B<pod_find> may be a hash reference with options.
-The rest are either directories that are searched recursively or files.
-The POD names of files are the plain basenames with any Perl-like extension
-(.pm, .pl, .pod) stripped.
+B<OPTIONS> The first argument for B<pod_find> may be a hash reference
+with options. The rest are either directories that are searched
+recursively or files. The POD names of files are the plain basenames
+with any Perl-like extension (.pm, .pl, .pod) stripped.
=over 4
-=item B<-verbose>
+=item C<-verbose =E<gt> 1>
Print progress information while scanning.
-=item B<-perl>
+=item C<-perl =E<gt> 1>
Apply Perl-specific heuristics to find the correct PODs. This includes
stripping Perl-like extensions, omitting subdirectories that are numeric
but do I<not> match the current Perl interpreter's version id, suppressing
F<site_perl> as a module hierarchy name etc.
-=item B<-script>
+=item C<-script =E<gt> 1>
Search for PODs in the current Perl interpreter's installation
B<scriptdir>. This is taken from the local L<Config|Config> module.
-=item B<-inc>
+=item C<-inc =E<gt> 1>
Search for PODs in the current Perl interpreter's I<@INC> paths. This
-automatically considers paths specified in the C<PERL5LIB> environment.
+automatically considers paths specified in the C<PERL5LIB> environment
+as this is prepended to I<@INC> by the Perl interpreter itself.
=back
-=head1 AUTHOR
-
-Marek Rouchal E<lt>marek@saftsack.fs.uni-bayreuth.deE<gt>,
-heavily borrowing code from Nick Ing-Simmons' PodToHtml.
-
-=head1 SEE ALSO
-
-L<Pod::Parser>, L<Pod::Checker>
-
=cut
-use strict;
-#use diagnostics;
-use Exporter;
-use File::Spec;
-use File::Find;
-use Cwd;
-
-use vars qw(@ISA @EXPORT_OK $VERSION);
-@ISA = qw(Exporter);
-@EXPORT_OK = qw(&pod_find &simplify_name);
-
-# package global variables
-my $SIMPLIFY_RX;
-
# return a hash of the POD files found
# first argument may be a hashref (options),
# rest is a list of directories to search recursively
# check extension or executable flag
# this involves testing the .bat extension on Win32!
- unless($file =~ /\.(pod|pm|plx?)\z/i || (-f $file && -x _ && -T _)) {
- return undef;
+ unless(-f $file && -T _ && ($file =~ /\.(pod|pm|plx?)\z/i || -x _ )) {
+ return undef;
}
- # check for one line of POD
- unless(open(POD,"<$file")) {
- warn "Error: $file is unreadable: $!\n";
- return undef;
- }
- local $/ = undef;
- my $pod = <POD>;
- close(POD);
- unless($pod =~ /\n=(head\d|pod|over|item)\b/) {
- warn "No POD in $file, skipping.\n"
- if($verbose);
- return;
- }
- undef $pod;
+ return undef unless contains_pod($file,$verbose);
# strip non-significant path components
- # _TODO_ what happens on e.g. Win32?
+ # TODO what happens on e.g. Win32?
my $name = $file;
if(defined $root_rx) {
$name =~ s!$root_rx!!s;
$name;
}
+=head2 C<simplify_name( $str )>
+
+The function B<simplify_name> is equivalent to B<basename>, but also
+strips Perl-like extensions (.pm, .pl, .pod) and extensions like
+F<.bat>, F<.cmd> on Win32 and OS/2, respectively.
+
+=cut
+
# basic simplification of the POD name:
# basename & strip extension
sub simplify_name {
$_[0] =~ s/\.(bat|exe|cmd)\z//i if($^O =~ /win|os2/i);
}
+# contribution from Tim Jenness <t.jenness@jach.hawaii.edu>
+
+=head2 C<pod_where( { %opts }, $pod )>
+
+Returns the location of a pod document given a search directory
+and a module (e.g. C<File::Find>) or script (e.g. C<perldoc>) name.
+
+Options:
+
+=over 4
+
+=item C<-inc =E<gt> 1>
+
+Search @INC for the pod and also the C<scriptdir> defined in the
+L<Config|Config> module.
+
+=item C<-dirs =E<gt> [ $dir1, $dir2, ... ]>
+
+Reference to an array of search directories. These are searched in order
+before looking in C<@INC> (if B<-inc>). Current directory is used if
+none are specified.
+
+=item C<-verbose =E<gt> 1>
+
+List directories as they are searched
+
+=back
+
+Returns the full path of the first occurence to the file.
+Package names (eg 'A::B') are automatically converted to directory
+names in the selected directory. (eg on unix 'A::B' is converted to
+'A/B'). Additionally, '.pm', '.pl' and '.pod' are appended to the
+search automatically if required.
+
+A subdirectory F<pod/> is also checked if it exists in any of the given
+search directories. This ensures that e.g. L<perlfunc|perlfunc> is
+found.
+
+It is assumed that if a module name is supplied, that that name
+matches the file name. Pods are not opened to check for the 'NAME'
+entry.
+
+A check is made to make sure that the file that is found does
+contain some pod documentation.
+
+=cut
+
+sub pod_where {
+
+ # default options
+ my %options = (
+ '-inc' => 0,
+ '-verbose' => 0,
+ '-dirs' => [ '.' ],
+ );
+
+ # Check for an options hash as first argument
+ if (defined $_[0] && ref($_[0]) eq 'HASH') {
+ my $opt = shift;
+
+ # Merge default options with supplied options
+ %options = (%options, %$opt);
+ }
+
+ # Check usage
+ carp 'Usage: pod_where({options}, $pod)' unless (scalar(@_));
+
+ # Read argument
+ my $pod = shift;
+
+ # Split on :: and then join the name together using File::Spec
+ my @parts = split (/::/, $pod);
+
+ # Get full directory list
+ my @search_dirs = @{ $options{'-dirs'} };
+
+ if ($options{'-inc'}) {
+
+ require Config;
+
+ # Add @INC
+ push (@search_dirs, @INC) if $options{'-inc'};
+
+ # Add location of pod documentation for perl man pages (eg perlfunc)
+ # This is a pod directory in the private install tree
+ #my $perlpoddir = File::Spec->catdir($Config::Config{'installprivlib'},
+ # 'pod');
+ #push (@search_dirs, $perlpoddir)
+ # if -d $perlpoddir;
+
+ # Add location of binaries such as pod2text
+ push (@search_dirs, $Config::Config{'scriptdir'})
+ if -d $Config::Config{'scriptdir'};
+ }
+
+ # Loop over directories
+ Dir: foreach my $dir ( @search_dirs ) {
+
+ # Don't bother if cant find the directory
+ if (-d $dir) {
+ warn "Looking in directory $dir\n"
+ if $options{'-verbose'};
+
+ # Now concatenate this directory with the pod we are searching for
+ my $fullname = File::Spec->catfile($dir, @parts);
+ warn "Filename is now $fullname\n"
+ if $options{'-verbose'};
+
+ # Loop over possible extensions
+ foreach my $ext ('', '.pod', '.pm', '.pl') {
+ my $fullext = $fullname . $ext;
+ if (-f $fullext &&
+ contains_pod($fullext, $options{'-verbose'}) ) {
+ warn "FOUND: $fullext\n" if $options{'-verbose'};
+ return $fullext;
+ }
+ }
+ } else {
+ warn "Directory $dir does not exist\n"
+ if $options{'-verbose'};
+ next Dir;
+ }
+ if(-d File::Spec->catdir($dir,'pod')) {
+ $dir = File::Spec->catdir($dir,'pod');
+ redo Dir;
+ }
+ }
+ # No match;
+ return undef;
+}
+
+=head2 C<contains_pod( $file , $verbose )>
+
+Returns true if the supplied filename (not POD module) contains some pod
+information.
+
+=cut
+
+sub contains_pod {
+ my $file = shift;
+ my $verbose = 0;
+ $verbose = shift if @_;
+
+ # check for one line of POD
+ unless(open(POD,"<$file")) {
+ warn "Error: $file is unreadable: $!\n";
+ return undef;
+ }
+
+ local $/ = undef;
+ my $pod = <POD>;
+ close(POD) || die "Error closing $file: $!\n";
+ unless($pod =~ /\n=(head\d|pod|over|item)\b/s) {
+ warn "No POD in $file, skipping.\n"
+ if($verbose);
+ return 0;
+ }
+
+ return 1;
+}
+
+=head1 AUTHOR
+
+Marek Rouchal E<lt>marek@saftsack.fs.uni-bayreuth.deE<gt>,
+heavily borrowing code from Nick Ing-Simmons' PodToHtml.
+
+Tim Jenness E<lt>t.jenness@jach.hawaii.eduE<gt> provided
+C<pod_where> and C<contains_pod>.
+
+=head1 SEE ALSO
+
+L<Pod::Parser>, L<Pod::Checker>, L<perldoc>
+
+=cut
+
1;
package Pod::InputObjects;
use vars qw($VERSION);
-$VERSION = 1.12; ## Current version of this package
+$VERSION = 1.13; ## Current version of this package
require 5.005; ## requires this Perl version or later
#############################################################################
=begin __PRIVATE__
-=item B<Pod::InputSource>
+=item package B<Pod::InputSource>
An object corresponding to a source of POD input text. It is mostly a
wrapper around a filehandle or C<IO::Handle>-type object (or anything
=end __PRIVATE__
-=item B<Pod::Paragraph>
+=item package B<Pod::Paragraph>
An object corresponding to a paragraph of POD input text. It may be a
plain paragraph, a verbatim paragraph, or a command paragraph (see
L<perlpod>).
-=item B<Pod::InteriorSequence>
+=item package B<Pod::InteriorSequence>
An object corresponding to an interior sequence command from the POD
input text (see L<perlpod>).
-=item B<Pod::ParseTree>
+=item package B<Pod::ParseTree>
An object corresponding to a tree of parsed POD text. Each "node" in
a parse-tree (or I<ptree>) is either a text-string or a reference to
a B<Pod::InteriorSequence> object. The nodes appear in the parse-tree
-in they order in which they were parsed from left-to-right.
+in the order in which they were parsed from left-to-right.
=back
##---------------------------------------------------------------------------
-=head2 B<new()>
+=head2 Pod::Paragraph-E<gt>B<new()>
my $pod_para1 = Pod::Paragraph->new(-text => $text);
my $pod_para2 = Pod::Paragraph->new(-name => $cmd,
##---------------------------------------------------------------------------
-=head2 B<cmd_name()>
+=head2 $pod_para-E<gt>B<cmd_name()>
my $para_cmd = $pod_para->cmd_name();
##---------------------------------------------------------------------------
-=head2 B<text()>
+=head2 $pod_para-E<gt>B<text()>
my $para_text = $pod_para->text();
##---------------------------------------------------------------------------
-=head2 B<raw_text()>
+=head2 $pod_para-E<gt>B<raw_text()>
my $raw_pod_para = $pod_para->raw_text();
##---------------------------------------------------------------------------
-=head2 B<cmd_prefix()>
+=head2 $pod_para-E<gt>B<cmd_prefix()>
my $prefix = $pod_para->cmd_prefix();
##---------------------------------------------------------------------------
-=head2 B<cmd_separator()>
+=head2 $pod_para-E<gt>B<cmd_separator()>
my $separator = $pod_para->cmd_separator();
##---------------------------------------------------------------------------
-=head2 B<parse_tree()>
+=head2 $pod_para-E<gt>B<parse_tree()>
my $ptree = $pod_parser->parse_text( $pod_para->text() );
$pod_para->parse_tree( $ptree );
##---------------------------------------------------------------------------
-=head2 B<file_line()>
+=head2 $pod_para-E<gt>B<file_line()>
my ($filename, $line_number) = $pod_para->file_line();
my $position = $pod_para->file_line();
Returns the current filename and line number for the paragraph
-object. If called in a list context, it returns a list of two
+object. If called in an array context, it returns a list of two
elements: first the filename, then the line number. If called in
a scalar context, it returns a string containing the filename, followed
by a colon (':'), followed by the line number.
##---------------------------------------------------------------------------
-=head2 B<new()>
+=head2 Pod::InteriorSequence-E<gt>B<new()>
my $pod_seq1 = Pod::InteriorSequence->new(-name => $cmd
-ldelim => $delimiter);
##---------------------------------------------------------------------------
-=head2 B<cmd_name()>
+=head2 $pod_seq-E<gt>B<cmd_name()>
my $seq_cmd = $pod_seq->cmd_name();
##---------------------------------------------------------------------------
-=head2 B<prepend()>
+=head2 $pod_seq-E<gt>B<prepend()>
$pod_seq->prepend($text);
$pod_seq1->prepend($pod_seq2);
##---------------------------------------------------------------------------
-=head2 B<append()>
+=head2 $pod_seq-E<gt>B<append()>
$pod_seq->append($text);
$pod_seq1->append($pod_seq2);
##---------------------------------------------------------------------------
-=head2 B<nested()>
+=head2 $pod_seq-E<gt>B<nested()>
$outer_seq = $pod_seq->nested || print "not nested";
##---------------------------------------------------------------------------
-=head2 B<raw_text()>
+=head2 $pod_seq-E<gt>B<raw_text()>
my $seq_raw_text = $pod_seq->raw_text();
##---------------------------------------------------------------------------
-=head2 B<left_delimiter()>
+=head2 $pod_seq-E<gt>B<left_delimiter()>
my $ldelim = $pod_seq->left_delimiter();
##---------------------------------------------------------------------------
-=head2 B<right_delimiter()>
+=head2 $pod_seq-E<gt>B<right_delimiter()>
The rightmost delimiter beginning the argument text to the interior
sequence (should be ">").
##---------------------------------------------------------------------------
-=head2 B<parse_tree()>
+=head2 $pod_seq-E<gt>B<parse_tree()>
my $ptree = $pod_parser->parse_text($paragraph_text);
$pod_seq->parse_tree( $ptree );
##---------------------------------------------------------------------------
-=head2 B<file_line()>
+=head2 $pod_seq-E<gt>B<file_line()>
my ($filename, $line_number) = $pod_seq->file_line();
my $position = $pod_seq->file_line();
Returns the current filename and line number for the interior sequence
-object. If called in a list context, it returns a list of two
+object. If called in an array context, it returns a list of two
elements: first the filename, then the line number. If called in
a scalar context, it returns a string containing the filename, followed
by a colon (':'), followed by the line number.
##---------------------------------------------------------------------------
-=head2 B<DESTROY()>
+=head2 Pod::InteriorSequence::B<DESTROY()>
This method performs any necessary cleanup for the interior-sequence.
If you override this method then it is B<imperative> that you invoke
##---------------------------------------------------------------------------
-=head2 B<new()>
+=head2 Pod::ParseTree-E<gt>B<new()>
my $ptree1 = Pod::ParseTree->new;
my $ptree2 = new Pod::ParseTree;
##---------------------------------------------------------------------------
-=head2 B<top()>
+=head2 $ptree-E<gt>B<top()>
my $top_node = $ptree->top();
$ptree->top( $top_node );
##---------------------------------------------------------------------------
-=head2 B<children()>
+=head2 $ptree-E<gt>B<children()>
This method gets/sets the children of the top node in the parse-tree.
If no arguments are given, it returns the list (array) of children
##---------------------------------------------------------------------------
-=head2 B<prepend()>
+=head2 $ptree-E<gt>B<prepend()>
This method prepends the given text or parse-tree to the current parse-tree.
If the first item on the parse-tree is text and the argument is also text,
##---------------------------------------------------------------------------
-=head2 B<append()>
+=head2 $ptree-E<gt>B<append()>
This method appends the given text or parse-tree to the current parse-tree.
If the last item on the parse-tree is text and the argument is also text,
}
}
-=head2 B<raw_text()>
+=head2 $ptree-E<gt>B<raw_text()>
my $ptree_raw_text = $ptree->raw_text();
## nothing to do, Pod::ParseTrees cant have parent pointers
}
-=head2 B<DESTROY()>
+=head2 Pod::ParseTree::B<DESTROY()>
This method performs any necessary cleanup for the parse-tree.
If you override this method then it is B<imperative>
package Pod::ParseUtils;
use vars qw($VERSION);
-$VERSION = 0.2; ## Current version of this package
+$VERSION = 0.22; ## Current version of this package
require 5.005; ## requires this Perl version or later
=head1 NAME
=over 4
-=item new()
+=item Pod::List-E<gt>new()
Create a new list object. Properties may be specified through a hash
reference like this:
$self->{-type} ||= '';
}
-=item file()
+=item $list-E<gt>file()
Without argument, retrieves the file name the list is in. This must
have been set before by either specifying B<-file> in the B<new()>
return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file};
}
-=item start()
+=item $list-E<gt>start()
Without argument, retrieves the line number where the list started.
This must have been set before by either specifying B<-start> in the
return (@_ > 1) ? ($_[0]->{-start} = $_[1]) : $_[0]->{-start};
}
-=item indent()
+=item $list-E<gt>indent()
Without argument, retrieves the indent level of the list as specified
in C<=over n>. This must have been set before by either specifying
return (@_ > 1) ? ($_[0]->{-indent} = $_[1]) : $_[0]->{-indent};
}
-=item type()
+=item $list-E<gt>type()
Without argument, retrieves the list type, which can be an arbitrary value,
e.g. C<OL>, C<UL>, ... when thinking the HTML way.
return (@_ > 1) ? ($_[0]->{-type} = $_[1]) : $_[0]->{-type};
}
-=item rx()
+=item $list-E<gt>rx()
Without argument, retrieves a regular expression for simplifying the
individual item strings once the list type has been determined. Usage:
return (@_ > 1) ? ($_[0]->{-rx} = $_[1]) : $_[0]->{-rx};
}
-=item item()
+=item $list-E<gt>item()
Without argument, retrieves the array of the items in this list.
The items may be represented by any scalar.
}
}
-=item parent()
+=item $list-E<gt>parent()
Without argument, retrieves information about the parent holding this
list, which is represented as an arbitrary scalar.
return (@_ > 1) ? ($_[0]->{-parent} = $_[1]) : $_[0]->{-parent};
}
-=item tag()
+=item $list-E<gt>tag()
Without argument, retrieves information about the list tag, which can be
any scalar.
=over 4
-=item new()
+=item Pod::Hyperlink-E<gt>new()
The B<new()> method can either be passed a set of key/value pairs or a single
scalar value, namely the contents of a C<LE<lt>...E<gt>> sequence. An object
$self->{_warnings} = [];
}
-=item parse($string)
+=item $link-E<gt>parse($string)
This method can be used to (re)parse a (new) hyperlink, i.e. the contents
of a C<LE<lt>...E<gt>> sequence. The result is stored in the current object.
+Warnings are stored in the B<warnings> property.
+E.g. sections like C<LE<lt>open(2)E<gt>> are deprected, as they do not point
+to Perl documents. C<LE<lt>DBI::foo(3p)E<gt>> is wrong as well, the manpage
+section can simply be dropped.
=cut
my $self = shift;
local($_) = $_[0];
# syntax check the link and extract destination
- my ($alttext,$page,$node,$type) = ('','','','');
+ my ($alttext,$page,$node,$type) = (undef,'','','');
$self->{_warnings} = [];
# problem: a lot of people use (), or (1) or the like to indicate
# man page sections. But this collides with L<func()> that is supposed
# to point to an internal funtion...
- # I would like the following better, here and below:
- #if(m!^(\w+(?:::\w+)*)$!) {
- my $page_rx = '[\w.]+(?:::[\w.]+)*';
+ my $page_rx = '[\w.]+(?:::[\w.]+)*(?:[(](?:\d\w*|)[)]|)';
+ # page name only
if(m!^($page_rx)$!o) {
$page = $1;
$type = 'page';
}
# alttext, page and "section"
- elsif(m!^(.+?)\s*[|]\s*($page_rx)\s*/\s*"(.+)"$!o) {
+ elsif(m!^(.*?)\s*[|]\s*($page_rx)\s*/\s*"(.+)"$!o) {
($alttext, $page, $node) = ($1, $2, $3);
$type = 'section';
}
# alttext and page
- elsif(m!^(.+?)\s*[|]\s*($page_rx)$!o) {
+ elsif(m!^(.*?)\s*[|]\s*($page_rx)$!o) {
($alttext, $page) = ($1, $2);
$type = 'page';
}
# alttext and "section"
- elsif(m!^(.+?)\s*[|]\s*(?:/\s*|)"(.+)"$!) {
+ elsif(m!^(.*?)\s*[|]\s*(?:/\s*|)"(.+)"$!) {
($alttext, $node) = ($1,$2);
$type = 'section';
}
$type = 'hyperlink';
}
# alttext, page and item
- elsif(m!^(.+?)\s*[|]\s*($page_rx)\s*/\s*(.+)$!o) {
+ elsif(m!^(.*?)\s*[|]\s*($page_rx)\s*/\s*(.+)$!o) {
($alttext, $page, $node) = ($1, $2, $3);
$type = 'item';
}
# alttext and item
- elsif(m!^(.+?)\s*[|]\s*/(.+)$!) {
+ elsif(m!^(.*?)\s*[|]\s*/(.+)$!) {
($alttext, $node) = ($1,$2);
}
# nonstandard: alttext and hyperlink
- elsif(m!^(.+?)\s*[|]\s*((?:http|ftp|mailto|news):.+)$!) {
+ elsif(m!^(.*?)\s*[|]\s*((?:http|ftp|mailto|news):.+)$!) {
($alttext, $node) = ($1,$2);
$type = 'hyperlink';
}
# collapse whitespace in nodes
$node =~ s/\s+/ /gs;
- #if($page =~ /[(]\w*[)]$/) {
- # $self->warning("section in '$page' deprecated");
- #}
+ # empty alternative text expands to node name
+ if(defined $alttext) {
+ if(!length($alttext)) {
+ $alttext = $node | $page;
+ }
+ }
+ else {
+ $alttext = '';
+ }
+
+ if($page =~ /[(]\w*[)]$/) {
+ $self->warning("(section) in '$page' deprecated");
+ }
if($node =~ m:[|/]:) {
$self->warning("node '$node' contains non-escaped | or /");
}
}
}
-=item markup($string)
+=item $link-E<gt>markup($string)
Set/retrieve the textual value of the link. This string contains special
markers C<PE<lt>E<gt>> and C<QE<lt>E<gt>> that should be expanded by the
return (@_ > 1) ? ($_[0]->{_markup} = $_[1]) : $_[0]->{_markup};
}
-=item text()
+=item $link-E<gt>text()
This method returns the textual representation of the hyperlink as above,
but without markers (read only). Depending on the link type this is one of
$_[0]->{_text};
}
-=item warning()
+=item $link-E<gt>warning()
After parsing, this method returns any warnings encountered during the
parsing process.
return @{$self->{_warnings}};
}
-=item line(), file()
+=item $link-E<gt>file()
+
+=item $link-E<gt>line()
Just simple slots for storing information about the line and the file
the link was encountered in. Has to be filled in manually.
return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file};
}
-=item page()
+=item $link-E<gt>page()
This method sets or returns the POD page this link points to.
$_[0]->{-page};
}
-=item node()
+=item $link-E<gt>node()
As above, but the destination node text of the link.
$_[0]->{-node};
}
-=item alttext()
+=item $link-E<gt>alttext()
Sets or returns an alternative text specified in the link.
$_[0]->{-alttext};
}
-=item type()
+=item $link-E<gt>type()
The node type, either C<section> or C<item>. As an unofficial type,
there is also C<hyperlink>, derived from e.g. C<LE<lt>http://perl.comE<gt>>
return (@_ > 1) ? ($_[0]->{-type} = $_[1]) : $_[0]->{-type};
}
-=item link()
+=item $link-E<gt>link()
Returns the link as contents of C<LE<lt>E<gt>>. Reciprocal to B<parse()>.
=over 4
-=item new()
+=item Pod::Cache-E<gt>new()
Create a new cache object. This object can hold an arbitrary number of
POD documents of class Pod::Cache::Item.
return $self;
}
-=item item()
+=item $cache-E<gt>item()
Add a new item to the cache. Without arguments, this method returns a
list of all cache elements.
}
}
-=item find_page($name)
+=item $cache-E<gt>find_page($name)
Look for a POD document named C<$name> in the cache. Returns the
reference to the corresponding Pod::Cache::Item object or undef if
=over 4
-=item new()
+=item Pod::Cache::Item-E<gt>new()
Create a new object.
$self->{-nodes} = [] unless(defined $self->{-nodes});
}
-=item page()
+=item $cacheitem-E<gt>page()
Set/retrieve the POD document name (e.g. "Pod::Parser").
return (@_ > 1) ? ($_[0]->{-page} = $_[1]) : $_[0]->{-page};
}
-=item description()
+=item $cacheitem-E<gt>description()
Set/retrieve the POD short description as found in the C<=head1 NAME>
section.
return (@_ > 1) ? ($_[0]->{-description} = $_[1]) : $_[0]->{-description};
}
-=item path()
+=item $cacheitem-E<gt>path()
Set/retrieve the POD file storage path.
return (@_ > 1) ? ($_[0]->{-path} = $_[1]) : $_[0]->{-path};
}
-=item file()
+=item $cacheitem-E<gt>file()
Set/retrieve the POD file name.
return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file};
}
-=item nodes()
+=item $cacheitem-E<gt>nodes()
Add a node (or a list of nodes) to the document's node list. Note that
the order is kept, i.e. start with the first node and end with the last.
}
}
-=item find_node($name)
+=item $cacheitem-E<gt>find_node($name)
Look for a node or index entry named C<$name> in the object.
Returns the unique id of the node (i.e. the second element of the array
stored in the node arry) or undef if not found.
-=back
-
=cut
sub find_node {
undef;
}
-=item idx()
+=item $cacheitem-E<gt>idx()
Add an index entry (or a list of them) to the document's index list. Note that
the order is kept, i.e. start with the first node and end with the last.
An index entry can be any scalar, but usually is a pair of string and
unique id.
+=back
+
=cut
# The POD index entries
use Pod::InputObjects;
use Carp;
use Exporter;
-require VMS::Filespec if $^O eq 'VMS';
BEGIN {
if ($] < 5.6) {
require Symbol;
my $errorsub = (@seq_stack > 1) ? $self->errorsub() : undef;
while (@seq_stack > 1) {
($cmd, $file, $line) = ($seq->name, $seq->file_line);
- $file = VMS::Filespec::unixify($file) if $^O eq 'VMS';
$ldelim = $seq->ldelim;
($rdelim = $ldelim) =~ tr/</>/;
$rdelim =~ s/^(\S+)(\s*)$/$2$1/;
&& (length $paragraph));
## Issue a warning about any non-empty blank lines
- if (length($1) > 1 and $myOpts{'-warnings'} and ! $myData{_CUTTING}) {
+ if (length($1) > 0 and $myOpts{'-warnings'} and ! $myData{_CUTTING}) {
my $errorsub = $self->errorsub();
my $file = $self->input_file();
- $file = VMS::Filespec::unixify($file) if $^O eq 'VMS';
my $errmsg = "*** WARNING: line containing nothing but whitespace".
" in paragraph at line $nlines in file $file\n";
(ref $errorsub) and &{$errorsub}($errmsg)
package Pod::Select;
use vars qw($VERSION);
-$VERSION = 1.12; ## Current version of this package
+$VERSION = 1.13; ## Current version of this package
require 5.005; ## requires this Perl version or later
#############################################################################
=over 4
-=item
+=item *
I<head1-title-regex>/I<head2-title-regex>/...
=over 4
-=item
+=item *
/I<start-range-regex>/[../I<end-range-regex>/]
package Pod::Usage;
use vars qw($VERSION);
-$VERSION = 1.12; ## Current version of this package
+$VERSION = 1.13; ## Current version of this package
require 5.005; ## requires this Perl version or later
=head1 NAME
arguments corresponding to an associative array (a "hash"). When a single
argument is given, it should correspond to exactly one of the following:
-=over
+=over 4
=item *
as a list) it should contain one or more elements with the following
keys:
-=over
+=over 4
=item C<-message>
status, verbose level, and output stream to use are determined as
follows:
-=over
+=over 4
=item *
"the right thing" in most situations. This determination of the default
values to use is based upon the following typical Unix conventions:
-=over
+=over 4
=item *
## Check for too many filenames
pod2usage("$0: Too many files given.\n") if (@ARGV > 1);
-Some users however may feel that the above "economy of expression" is
+Some user's however may feel that the above "economy of expression" is
not particularly readable nor consistent and may instead choose to do
something more like the following:
#############################################################################
# pod2usage -- command to print usage messages from embedded pod docs
#
-# Copyright (c) 1996-1999 by Bradford Appleton. All rights reserved.
+# Copyright (c) 1996-2000 by Bradford Appleton. All rights reserved.
# This file is part of "PodParser". PodParser is free software;
# you can redistribute it and/or modify it under the same terms
# as Perl itself.
#############################################################################
# podchecker -- command to invoke the podchecker function in Pod::Checker
#
-# Copyright (c) 1998-1999 by Bradford Appleton. All rights reserved.
+# Copyright (c) 1998-2000 by Bradford Appleton. All rights reserved.
# This file is part of "PodParser". PodParser is free software;
# you can redistribute it and/or modify it under the same terms
# as Perl itself.
=item B<-warnings> B<-nowarnings>
-Turn on/off printing of warnings.
+Turn on/off printing of warnings. Repeating B<-warnings> increases the
+warning level, i.e. more warnings are printed. Currently increasing to
+level two causes flagging of unescaped "E<lt>,E<gt>" characters.
=item I<file>
it find to STDERR. At the end, it will print a status message
indicating the number of errors found.
+Directories are ignored, an appropriate warning message is printed.
+
B<podchecker> invokes the B<podchecker()> function exported by B<Pod::Checker>
Please see L<Pod::Checker/podchecker()> for more details.
use Getopt::Long;
## Define options
-my %options = (
- "help" => 0,
- "man" => 0,
- "warnings" => 1,
-);
+my %options;
## Parse options
-GetOptions(\%options, "help", "man", "warnings!") || pod2usage(2);
+GetOptions(\%options, qw(help man warnings+ nowarnings)) || pod2usage(2);
pod2usage(1) if ($options{help});
pod2usage(-verbose => 2) if ($options{man});
+if($options{nowarnings}) {
+ $options{warnings} = 0;
+}
+elsif(!defined $options{warnings}) {
+ $options{warnings} = 1; # default is warnings on
+}
+
## Dont default to STDIN if connected to a terminal
pod2usage(2) if ((@ARGV == 0) && (-t STDIN));
## Invoke podchecker()
my $status = 0;
-@ARGV = ("<&STDIN") unless(@ARGV);
+@ARGV = qw(-) unless(@ARGV);
for (@ARGV) {
+ if($_ eq '-') {
+ $_ = "<&STDIN";
+ }
+ elsif(-d) {
+ warn "podchecker: Warning: Ignoring directory '$_'\n";
+ next;
+ }
my $s = podchecker($_, undef, '-warnings' => $options{warnings});
if($s > 0) {
# errors occurred
#############################################################################
# podselect -- command to invoke the podselect function in Pod::Select
#
-# Copyright (c) 1996-1999 by Bradford Appleton. All rights reserved.
+# Copyright (c) 1996-2000 by Bradford Appleton. All rights reserved.
# This file is part of "PodParser". PodParser is free software;
# you can redistribute it and/or modify it under the same terms
# as Perl itself.
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testp2pt.pl";
import TestPodIncPlainText;
}
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testp2pt.pl";
import TestPodIncPlainText;
}
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testp2pt.pl";
import TestPodIncPlainText;
}
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testp2pt.pl";
import TestPodIncPlainText;
}
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testp2pt.pl";
import TestPodIncPlainText;
}
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testp2pt.pl";
import TestPodIncPlainText;
}
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testp2pt.pl";
import TestPodIncPlainText;
}
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testp2pt.pl";
import TestPodIncPlainText;
}
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testp2pt.pl";
import TestPodIncPlainText;
}
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testp2pt.pl";
import TestPodIncPlainText;
}
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testp2pt.pl";
import TestPodIncPlainText;
}
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testpchk.pl";
import TestPodChecker;
}
=over 4
-=item oops
+=item aaps
=head2 end without begin
=end
+second one results in end w/o begin
+
+=head2 begin w/o formatter
+
+=begin
+
+=end
+
+=head2 for w/o formatter
+
+=for
+
+something...
+
=head2 Nested sequences of the same type
C<code I<italic C<code again!>>>
E<alea iacta est>
E<C<auml>>
E<abcI<bla>>
+E<0x100>
+E<07777>
+E<300>
=head2 Unresolved internal links
L<abc
def>
L<>
+L< aha>
+L<oho >
L<"Warnings"> this one is ok
+L</unescaped> ok too, this POD has an X of the same name
=head2 Warnings
L<passwd(5)>
-L< some text|page/"section" >
+L<some text with / in it|perlvar/$|> should give warnings as hell
=over 4
=back 200
+the 200 is evil
+
=begin html
What?
=end xml
+X<unescaped>see these unescaped < and > in the text?
+
+=head2 Misc
+
+Z<ddd> should be empty
+
+X<> should not be empty
+
+=over four
+
+This paragrapgh is misplaced - it ought to be an item.
+
+=item four should be numeric!
+
+=item
+
+=item blah
+
+=item previous is all empty!!!
+
+=back
+
+All empty over/back:
+
+=over 4
+
+=back
+
+item w/o name
+
+=cut
+
+=pod bla
+
+bla is evil
+
+=cut blub
+
+blub is evil
+
+=head2 reoccurence
+
=over 4
+=item Misc
+
+we already have a head Misc
+
=back
-see these unescaped < and > in the text?
+=head2 some heading
+
+=head2 another one
+
+previous section is empty!
=cut
+
-*** ERROR: Unknown command 'unknown1' at line 25 in file pod/poderrs.t
-*** ERROR: Unknown interior-sequence 'Q' at line 29 in file pod/poderrs.t
-*** ERROR: Unknown interior-sequence 'A' at line 30 in file pod/poderrs.t
-*** ERROR: Unknown interior-sequence 'Y' at line 31 in file pod/poderrs.t
-*** ERROR: Unknown interior-sequence 'V' at line 31 in file pod/poderrs.t
-*** ERROR: unterminated B<...> at line 35 in file pod/poderrs.t
-*** ERROR: unterminated I<...> at line 34 in file pod/poderrs.t
-*** ERROR: unterminated C<...> at line 37 in file pod/poderrs.t
-*** WARNING: line containing nothing but whitespace in paragraph at line 45 in file pod/poderrs.t
-*** ERROR: =item without previous =over at line 52 in file pod/poderrs.t
-*** ERROR: =back without previous =over at line 56 in file pod/poderrs.t
-*** ERROR: =over on line 60 without closing =back (at head2) at line 64 in file pod/poderrs.t
-*** ERROR: =end without =begin at line 66 in file pod/poderrs.t
-*** ERROR: Nested =begin's (first at line 70:html) at line 72 in file pod/poderrs.t
-*** ERROR: =end without =begin at line 76 in file pod/poderrs.t
-*** ERROR: nested commands C<...C<...>...> at line 80 in file pod/poderrs.t
-*** ERROR: garbled entity E<alea iacta est> at line 84 in file pod/poderrs.t
-*** ERROR: garbled entity E<C<auml>> at line 85 in file pod/poderrs.t
-*** ERROR: garbled entity E<abcI<bla>> at line 86 in file pod/poderrs.t
-*** WARNING: collapsing newlines to blanks at line 96 in file pod/poderrs.t
-*** ERROR: malformed link L<> : empty link at line 98 in file pod/poderrs.t
-*** WARNING: ignoring leading whitespace in link at line 104 in file pod/poderrs.t
-*** WARNING: ignoring trailing whitespace in link at line 104 in file pod/poderrs.t
-*** ERROR: Spurious character(s) after =back at line 110 in file pod/poderrs.t
-*** WARNING: No items in =over (at line 118) / =back list at line 120 in file pod/poderrs.t
-*** WARNING: 2 unescaped <> in paragraph at line 122 in file pod/poderrs.t
-*** ERROR: unresolved internal link 'begin or begin' at line 90 in file pod/poderrs.t
-*** ERROR: unresolved internal link 'end with begin' at line 91 in file pod/poderrs.t
-*** ERROR: unresolved internal link 'OoPs' at line 92 in file pod/poderrs.t
-*** ERROR: unresolved internal link 'abc def' at line 96 in file pod/poderrs.t
-*** ERROR: unresolved internal link 'passwd(5)' at line 103 in file pod/poderrs.t
-*** WARNING: multiple occurence of link target 'oops' at line - in file pod/poderrs.t
-pod/poderrs.t has 25 pod syntax errors.
+*** ERROR: Unknown command 'unknown1' at line 25 in file t/pod/poderrs.t
+*** ERROR: Unknown interior-sequence 'Q' at line 29 in file t/pod/poderrs.t
+*** ERROR: Unknown interior-sequence 'A' at line 30 in file t/pod/poderrs.t
+*** ERROR: Unknown interior-sequence 'Y' at line 31 in file t/pod/poderrs.t
+*** ERROR: Unknown interior-sequence 'V' at line 31 in file t/pod/poderrs.t
+*** ERROR: unterminated B<...> at line 35 in file t/pod/poderrs.t
+*** ERROR: unterminated I<...> at line 34 in file t/pod/poderrs.t
+*** ERROR: unterminated C<...> at line 37 in file t/pod/poderrs.t
+*** WARNING: line containing nothing but whitespace in paragraph at line 45 in file t/pod/poderrs.t
+*** ERROR: =item without previous =over at line 52 in file t/pod/poderrs.t
+*** ERROR: =back without previous =over at line 56 in file t/pod/poderrs.t
+*** ERROR: =over on line 60 without closing =back (at head2) at line 64 in file t/pod/poderrs.t
+*** ERROR: =end without =begin at line 66 in file t/pod/poderrs.t
+*** ERROR: Nested =begin's (first at line 70:html) at line 72 in file t/pod/poderrs.t
+*** ERROR: =end without =begin at line 76 in file t/pod/poderrs.t
+*** ERROR: No argument for =begin at line 82 in file t/pod/poderrs.t
+*** ERROR: =for without formatter specification at line 88 in file t/pod/poderrs.t
+*** ERROR: nested commands C<...C<...>...> at line 94 in file t/pod/poderrs.t
+*** ERROR: garbled entity E<alea iacta est> at line 98 in file t/pod/poderrs.t
+*** ERROR: garbled entity E<C<auml>> at line 99 in file t/pod/poderrs.t
+*** ERROR: garbled entity E<abcI<bla>> at line 100 in file t/pod/poderrs.t
+*** ERROR: Entity number out of range E<0x100> at line 101 in file t/pod/poderrs.t
+*** ERROR: Entity number out of range E<07777> at line 102 in file t/pod/poderrs.t
+*** ERROR: Entity number out of range E<300> at line 103 in file t/pod/poderrs.t
+*** WARNING: collapsing newlines to blanks at line 113 in file t/pod/poderrs.t
+*** ERROR: malformed link L<> : empty link at line 115 in file t/pod/poderrs.t
+*** WARNING: ignoring leading whitespace in link at line 116 in file t/pod/poderrs.t
+*** WARNING: ignoring trailing whitespace in link at line 117 in file t/pod/poderrs.t
+*** WARNING: (section) in 'passwd(5)' deprecated at line 123 in file t/pod/poderrs.t
+*** WARNING: node '$|' contains non-escaped | or / at line 124 in file t/pod/poderrs.t
+*** WARNING: alternative text '$|' contains non-escaped | or / at line 124 in file t/pod/poderrs.t
+*** ERROR: Spurious character(s) after =back at line 130 in file t/pod/poderrs.t
+*** ERROR: Nonempty Z<> at line 144 in file t/pod/poderrs.t
+*** ERROR: Empty X<> at line 146 in file t/pod/poderrs.t
+*** WARNING: No numeric argument for =over at line 148 in file t/pod/poderrs.t
+*** WARNING: preceding non-item paragraph(s) at line 152 in file t/pod/poderrs.t
+*** WARNING: No argument for =item at line 154 in file t/pod/poderrs.t
+*** WARNING: previous =item has no contents at line 156 in file t/pod/poderrs.t
+*** WARNING: No items in =over (at line 164) / =back list at line 166 in file t/pod/poderrs.t
+*** ERROR: Spurious text after =pod at line 172 in file t/pod/poderrs.t
+*** ERROR: Spurious text after =cut at line 176 in file t/pod/poderrs.t
+*** WARNING: empty section in previous paragraph at line 192 in file t/pod/poderrs.t
+*** ERROR: unresolved internal link 'begin or begin' at line 107 in file t/pod/poderrs.t
+*** ERROR: unresolved internal link 'end with begin' at line 108 in file t/pod/poderrs.t
+*** ERROR: unresolved internal link 'OoPs' at line 109 in file t/pod/poderrs.t
+*** ERROR: unresolved internal link 'abc def' at line 113 in file t/pod/poderrs.t
+*** WARNING: multiple occurence of link target 'Misc' at line - in file t/pod/poderrs.t
+t/pod/poderrs.t has 33 pod syntax errors.
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testp2pt.pl";
import TestPodIncPlainText;
}
-#!./perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ use File::Basename;
+ my $THISDIR = dirname $0;
+ unshift @INC, $THISDIR;
require "testp2pt.pl";
import TestPodIncPlainText;
}