summaryrefslogtreecommitdiff
path: root/lib/Pod
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-06-25 19:20:15 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-06-25 19:20:15 +0000
commitf011ec7d875a16a3b68226895fa8fc9035bb6e2e (patch)
tree64858c0b0f2e8edaca3aebdec0ecccb2af93cebc /lib/Pod
parentaefe6dfccddf8cd17a61950ab2c2f527a046180c (diff)
downloadperl-f011ec7d875a16a3b68226895fa8fc9035bb6e2e.tar.gz
Upgrade to podlators 1.22.
p4raw-id: //depot/perl@17354
Diffstat (limited to 'lib/Pod')
-rw-r--r--lib/Pod/Man.pm6
-rw-r--r--lib/Pod/Text.pm10
-rw-r--r--lib/Pod/t/man.t14
-rw-r--r--lib/Pod/t/text.t79
4 files changed, 99 insertions, 10 deletions
diff --git a/lib/Pod/Man.pm b/lib/Pod/Man.pm
index 0f0eaab14d..341c881fcd 100644
--- a/lib/Pod/Man.pm
+++ b/lib/Pod/Man.pm
@@ -1,5 +1,5 @@
# Pod::Man -- Convert POD data to formatted *roff input.
-# $Id: Man.pm,v 1.32 2002/01/02 09:02:24 eagle Exp $
+# $Id: Man.pm,v 1.33 2002/06/23 19:16:21 eagle Exp $
#
# Copyright 1999, 2000, 2001, 2002 by Russ Allbery <rra@stanford.edu>
#
@@ -38,7 +38,7 @@ use vars qw(@ISA %ESCAPES $PREAMBLE $VERSION);
# Don't use the CVS revision as the version, since this module is also in Perl
# core and too many things could munge CVS magic revision strings. This
# number should ideally be the same as the CVS revision in podlators, however.
-$VERSION = 1.32;
+$VERSION = 1.33;
##############################################################################
@@ -1012,7 +1012,7 @@ sub quote_literal {
| \$+ [\#^]? \S $index # special ($^Foo, $")
| [\$\@%&*]+ \#? [:\'\w]+ $index # plain var or func
| [\$\@%&*]* [:\'\w]+ (?: -> )? \(\s*[^\s,]\s*\) # 0/1-arg func call
- | [+-]? [\d.]+ (?: [eE] [+-]? \d+ )? # a number
+ | [+-]? ( \d[\d.]* | \.\d+ ) (?: [eE][+-]?\d+ )? # a number
| 0x [a-fA-F\d]+ # a hex constant
)
\s*\z
diff --git a/lib/Pod/Text.pm b/lib/Pod/Text.pm
index 12a450b42d..5806257b33 100644
--- a/lib/Pod/Text.pm
+++ b/lib/Pod/Text.pm
@@ -1,7 +1,7 @@
# Pod::Text -- Convert POD data to formatted ASCII text.
-# $Id: Text.pm,v 2.18 2002/01/01 02:40:51 eagle Exp $
+# $Id: Text.pm,v 2.19 2002/06/23 19:16:21 eagle Exp $
#
-# Copyright 1999, 2000, 2001 by Russ Allbery <rra@stanford.edu>
+# Copyright 1999, 2000, 2001, 2002 by Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -43,7 +43,7 @@ use vars qw(@ISA @EXPORT %ESCAPES $VERSION);
# Don't use the CVS revision as the version, since this module is also in Perl
# core and too many things could munge CVS magic revision strings. This
# number should ideally be the same as the CVS revision in podlators, however.
-$VERSION = 2.18;
+$VERSION = 2.19;
##############################################################################
@@ -459,7 +459,7 @@ sub seq_c {
| \$+ [\#^]? \S $index # special ($^Foo, $")
| [\$\@%&*]+ \#? [:\'\w]+ $index # plain var or func
| [\$\@%&*]* [:\'\w]+ (?: -> )? \(\s*[^\s,]\s*\) # 0/1-arg func call
- | [+-]? [\d.]+ (?: [eE] [+-]? \d+ )? # a number
+ | [+-]? ( \d[\d.]* | \.\d+ ) (?: [eE][+-]?\d+ )? # a number
| 0x [a-fA-F\d]+ # a hex constant
)
\s*\z
@@ -821,7 +821,7 @@ Pod::Parser by Brad Appleton <bradapp@enteract.com>.
=head1 COPYRIGHT AND LICENSE
-Copyright 1999, 2000, 2001 by Russ Allbery <rra@stanford.edu>.
+Copyright 1999, 2000, 2001, 2002 by Russ Allbery <rra@stanford.edu>.
This program is free software; you may redistribute it and/or modify it
under the same terms as Perl itself.
diff --git a/lib/Pod/t/man.t b/lib/Pod/t/man.t
index 5171cc6d13..8bf7abdcba 100644
--- a/lib/Pod/t/man.t
+++ b/lib/Pod/t/man.t
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# $Id: man.t,v 1.1 2002/01/02 09:03:28 eagle Exp $
+# $Id: man.t,v 1.2 2002/06/23 19:16:25 eagle Exp $
#
# man.t -- Additional specialized tests for Pod::Man.
#
@@ -17,7 +17,7 @@ BEGIN {
}
unshift (@INC, '../blib/lib');
$| = 1;
- print "1..2\n";
+ print "1..3\n";
}
END {
@@ -84,3 +84,13 @@ gcc \- GNU project C and C++ compiler
.IX Header " NOTES"
Other mentions of \*(C+.
###
+
+###
+=head1 PERIODS
+
+This C<.> should be quoted.
+###
+.SH "PERIODS"
+.IX Header "PERIODS"
+This \f(CW\*(C`.\*(C'\fR should be quoted.
+###
diff --git a/lib/Pod/t/text.t b/lib/Pod/t/text.t
new file mode 100644
index 0000000000..dc8579a9af
--- /dev/null
+++ b/lib/Pod/t/text.t
@@ -0,0 +1,79 @@
+#!/usr/bin/perl -w
+# $Id: text.t,v 1.1 2002/06/23 19:16:25 eagle Exp $
+#
+# text.t -- Additional specialized tests for Pod::Text.
+#
+# Copyright 2002 by Russ Allbery <rra@stanford.edu>
+#
+# This program is free software; you may redistribute it and/or modify it
+# under the same terms as Perl itself.
+
+BEGIN {
+ chdir 't' if -d 't';
+ if ($ENV{PERL_CORE}) {
+ @INC = '../lib';
+ } else {
+ unshift (@INC, '../blib/lib');
+ }
+ unshift (@INC, '../blib/lib');
+ $| = 1;
+ print "1..2\n";
+}
+
+END {
+ print "not ok 1\n" unless $loaded;
+}
+
+use Pod::Text;
+
+$loaded = 1;
+print "ok 1\n";
+
+my $n = 2;
+while (<DATA>) {
+ next until $_ eq "###\n";
+ open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ while (<DATA>) {
+ last if $_ eq "###\n";
+ print TMP $_;
+ }
+ close TMP;
+ my $parser = Pod::Text->new or die "Cannot create parser\n";
+ $parser->parse_from_file ('tmp.pod', 'out.tmp');
+ open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ my $output;
+ {
+ local $/;
+ $output = <TMP>;
+ }
+ close TMP;
+ unlink ('tmp.pod', 'out.tmp');
+ my $expected = '';
+ while (<DATA>) {
+ last if $_ eq "###\n";
+ $expected .= $_;
+ }
+ if ($output eq $expected) {
+ print "ok $n\n";
+ } else {
+ print "not ok $n\n";
+ print "Expected\n========\n$expected\nOutput\n======\n$output\n";
+ }
+ $n++;
+}
+
+# Below the marker are bits of POD and corresponding expected text output.
+# This is used to test specific features or problems with Pod::Text. The
+# input and output are separated by lines containing only ###.
+
+__DATA__
+
+###
+=head1 PERIODS
+
+This C<.> should be quoted.
+###
+PERIODS
+ This "." should be quoted.
+
+###