summaryrefslogtreecommitdiff
path: root/ext/Pod-Html
diff options
context:
space:
mode:
authorJames E Keenan <jkeenan@cpan.org>2022-11-25 19:56:10 +0000
committerJames E Keenan <jkeenan@cpan.org>2022-11-28 22:37:37 +0000
commitbcbede66ea9b2d1ecf2388cdeaa9690250ef7aee (patch)
treea983401481f52b8b74fe8f41df6b835b57327911 /ext/Pod-Html
parent285903d31244ff873b8ac875054b1140f8f60815 (diff)
downloadperl-bcbede66ea9b2d1ecf2388cdeaa9690250ef7aee.tar.gz
Pod-Html auxiliary subroutines now imported only from Pod::Html::Util
As part of the refactoring of Pod-Html conducted during the 5.35/5.36 development cycle, three subroutines were moved from ext/Pod-Html/lib/Pod/Html.pm to ext/Pod-Html/lib/Pod/Html/Util.pm. To allow for the possibility that someone might have been importing any of these subroutines from Pod::Html, in 5.36 we imported them from Pod::Html::Util and allowed their re-exporting and noted in the documentation that this proviso would be for 5.36 only (68327975be0). As of 5.38 we can dispense with this proviso and remove the test file used to exercise it as well. Update pod/perldelta.pod as needed. Keep porting tests happy.
Diffstat (limited to 'ext/Pod-Html')
-rw-r--r--ext/Pod-Html/lib/Pod/Html.pm13
-rw-r--r--ext/Pod-Html/lib/Pod/Html/Util.pm2
-rw-r--r--ext/Pod-Html/t/anchorify-536.t114
-rw-r--r--ext/Pod-Html/t/lib/Testing.pm2
4 files changed, 7 insertions, 124 deletions
diff --git a/ext/Pod-Html/lib/Pod/Html.pm b/ext/Pod-Html/lib/Pod/Html.pm
index a9b0d5e77c..7c568f9e91 100644
--- a/ext/Pod-Html/lib/Pod/Html.pm
+++ b/ext/Pod-Html/lib/Pod/Html.pm
@@ -2,10 +2,9 @@ package Pod::Html;
use strict;
use Exporter 'import';
-our $VERSION = 1.33;
+our $VERSION = 1.34;
$VERSION = eval $VERSION;
-our @EXPORT = qw(pod2html htmlify);
-our @EXPORT_OK = qw(anchorify relativize_url);
+our @EXPORT = qw(pod2html);
use Config;
use Cwd;
@@ -195,7 +194,7 @@ Display progress messages. By default, they won't be displayed.
=back
-=head2 Auxiliary Functions
+=head2 Formerly Exported Auxiliary Functions
Prior to perl-5.36, the following three functions were exported by
F<Pod::Html>, either by default or on request:
@@ -213,10 +212,8 @@ F<Pod::Html>, either by default or on request:
The definition and documentation of these functions have been moved to
F<Pod::Html::Util>, viewable via C<perldoc Pod::Html::Util>.
-In perl-5.36, these functions will be importable from either F<Pod::Html> or
-F<Pod::Html::Util>. However, beginning with perl-5.38 they will only be
-importable, upon request, from F<Pod::Html::Util>. Please modify your code as
-needed.
+Beginning with perl-5.38 these functions must be explicitly imported from
+F<Pod::Html::Util>. Please modify your code as needed.
=head1 ENVIRONMENT
diff --git a/ext/Pod-Html/lib/Pod/Html/Util.pm b/ext/Pod-Html/lib/Pod/Html/Util.pm
index 57fcab95cf..88452d4d4e 100644
--- a/ext/Pod-Html/lib/Pod/Html/Util.pm
+++ b/ext/Pod-Html/lib/Pod/Html/Util.pm
@@ -2,7 +2,7 @@ package Pod::Html::Util;
use strict;
use Exporter 'import';
-our $VERSION = 1.33; # Please keep in synch with lib/Pod/Html.pm
+our $VERSION = 1.34; # Please keep in synch with lib/Pod/Html.pm
$VERSION = eval $VERSION;
our @EXPORT_OK = qw(
anchorify
diff --git a/ext/Pod-Html/t/anchorify-536.t b/ext/Pod-Html/t/anchorify-536.t
deleted file mode 100644
index e8e01ea9c5..0000000000
--- a/ext/Pod-Html/t/anchorify-536.t
+++ /dev/null
@@ -1,114 +0,0 @@
-use strict;
-use warnings;
-use Pod::Html qw( anchorify relativize_url );
-my ($revision,$version,$subversion) = split /\./, sprintf("%vd",$^V);
-use Test::More;
-unless ($version == 35 or $version == 36) {
- plan skip_all => "Needed only during 5.36";
-}
-
-my @filedata;
-{
- local $/ = '';
- @filedata = <DATA>;
-}
-
-my (@poddata, $i, $j);
-for ($i = 0, $j = -1; $i <= $#filedata; $i++) {
- $j++ if ($filedata[$i] =~ /^\s*=head[1-6]/);
- if ($j >= 0) {
- $poddata[$j] = "" unless defined $poddata[$j];
- $poddata[$j] .= "\n$filedata[$i]" if $j >= 0;
- }
-}
-
-my %heads = ();
-foreach $i (0..$#poddata) {
- $heads{anchorify($1)} = 1 if $poddata[$i] =~ /=head[1-6]\s+(.*)/;
-}
-my %expected = map { $_ => 1 } qw(
- NAME
- DESCRIPTION
- Subroutine
- Error
- Method
- Has_A_Wordspace
- HasTrailingWordspace
- HasLeadingWordspace
- Has_Extra_InternalWordspace
- Has_Quotes
- Has_QuestionMark
- Has_Hyphen_And_Space
-);
-is_deeply(
- \%heads,
- \%expected,
- "Got expected POD heads"
-);
-
-{
- # adapted from 'installhtml'
- my $file = '/home/username/tmp/installhtml/pod/perlipc';
- my $capture = 'NAME';
- my $expected_url = '/home/username/tmp/installhtml/pod/perlipc/NAME.html';
- my $expected_relativized_url = 'perlipc/NAME.html';
- my $url = "$file/@{[anchorify(qq($capture))]}.html" ;
- is($url, $expected_url, "anchorify() returned expected value");
- my $relativized_url = relativize_url( $url, "$file.html" );
- is($relativized_url, $expected_relativized_url, "relativize_url() returned expected value");
-}
-
-done_testing;
-
-__DATA__
-=head1 NAME
-
-anchorify - Test C<Pod::Html::Util::anchorify()>
-
-=head1 DESCRIPTION
-
-alpha
-
-=head2 Subroutine
-
-beta
-
-=head3 Error
-
-gamma
-
-=head4 Method
-
-delta
-
-=head4 Has A Wordspace
-
-delta
-
-=head4 HasTrailingWordspace
-
-epsilon
-
-=head4 HasLeadingWordspace
-
-zeta
-
-=head4 Has Extra InternalWordspace
-
-eta
-
-=head4 Has"Quotes"
-
-theta
-
-=head4 Has?QuestionMark
-
-iota
-
-=head4 Has-Hyphen And Space
-
-kappa
-
-=cut
-
-__END__
diff --git a/ext/Pod-Html/t/lib/Testing.pm b/ext/Pod-Html/t/lib/Testing.pm
index a30f02af1f..5baf0bb3f5 100644
--- a/ext/Pod-Html/t/lib/Testing.pm
+++ b/ext/Pod-Html/t/lib/Testing.pm
@@ -2,7 +2,7 @@ package Testing;
use 5.10.0;
use warnings;
use Exporter 'import';
-our $VERSION = 1.33; # Let's keep this same as lib/Pod/Html.pm
+our $VERSION = 1.34; # Let's keep this same as lib/Pod/Html.pm
$VERSION = eval $VERSION;
our @EXPORT_OK = qw(
setup_testing_dir