Skip to content

Commit db42a77

Browse files
committed
Revert "Remove Distzilla to fix RT #120521" and friends
This reverts commits: - 853b4fc - bca3ffd - dc5585b And parts of: - 2b76778
1 parent dc5585b commit db42a77

18 files changed

+434
-220
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@ Makefile
1111
HTML-Tree-*.tar.gz
1212
HTML-Tree-*/
1313
lwp-test-*
14-
/MANIFEST.bak
15-
/Makefile.PL

Build.PL

+6-50
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,17 @@
1+
use 5.008;
12
use strict;
23
use warnings;
3-
use Module::Build;
4-
use 5.008;
5-
6-
my $class = Module::Build->subclass(
7-
class => 'My::Builder',
8-
code => q{
9-
sub ACTION_authortest {
10-
my ($self) = @_;
11-
$self->depends_on('build');
12-
$self->depends_on('manifest');
13-
$self->depends_on('distmeta');
14-
$self->test_files( qw< t xt/author > );
15-
$self->recursive_test_files(1);
16-
$self->depends_on('test');
17-
return;
18-
}
19-
sub ACTION_distdir {
20-
my ($self) = @_;
21-
$self->depends_on('authortest');
22-
return $self->SUPER::ACTION_distdir();
23-
}
24-
}
25-
);
4+
use inc::My_Build;
265

27-
my $builder = $class->new(
6+
my $builder = inc::My_Build->new(
287
module_name => 'HTML::Tree',
298
license => 'perl',
30-
dist_author => 'Jeff Fearn <[email protected]>',
9+
dist_author => 'Christopher J. Madsen <[email protected]>',
3110
dist_version_from => 'lib/HTML/Element.pm',
32-
create_makefile_pl => 'traditional',
33-
configure_requires => {
34-
'Module::Build' => 0,
35-
},
36-
build_requires => {
37-
'Module::Build' => 0,
38-
'Test::Exception' => 0,
39-
'Test::Fatal' => 0,
40-
'Test::More' => 0,
41-
'HTML::Parser' => 3.46,
42-
'HTML::Tagset' => 3.02,
43-
'LWP::UserAgent' => 0,
44-
'URI::file' => 0,
45-
'Pod::Usage' => 0,
46-
'Scalar::Util' => 0,
47-
},
48-
requires => {
49-
'HTML::Parser' => 3.46,
50-
'HTML::Tagset' => 3.02,
51-
'perl' => '5.8.0',
52-
'LWP::UserAgent' => 5.802, # HTTP::Message decoded_content method
53-
'Scalar::Util' => 0,
54-
'Pod::Usage' => 0,
55-
},
11+
##{ $plugin->get_prereqs ##}
5612
add_to_cleanup =>
5713
[ 'HTML-Tree-*', 'tmp', 'blib', 'lwp-test-*', 'MANIFEST.bak' ],
58-
script_files => ['bin/htmltree'],
14+
script_files => 'bin',
5915
);
6016

6117
$builder->create_build_script();

Changes

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ Changelog for HTML-Tree
33
5.05 UNRELEASED
44

55
[FIXES]
6-
* Add missing Test::Fatal build dep. RT #121230
6+
* Revert Dist::Zilla Removal
7+
- https://github.com/jfearn/HTML-Tree/issues/7
8+
- Vendor note: It should be simpler to compare 5.03 and 5.05
9+
than to compare 5.04 and 5.05, or 5.03 and 5.05.
10+
- Fixes RT#12230: Undeclared dep on Test::Fatal
11+
- https://rt.cpan.org/Ticket/Display.html?id=121230
712

813
5.04 2017--04-17
914
Release by Jeff Fearn

MANIFEST

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
bin/htmltree
21
Build.PL
32
Changes
3+
LICENSE
4+
MANIFEST
5+
META.json
6+
META.yml
7+
README
8+
TODO
9+
bin/htmltree
10+
inc/My_Build.pm
411
lib/HTML/AsSubs.pm
512
lib/HTML/Element.pm
613
lib/HTML/Element/traverse.pm
@@ -10,11 +17,7 @@ lib/HTML/Tree/AboutObjects.pod
1017
lib/HTML/Tree/AboutTrees.pod
1118
lib/HTML/Tree/Scanning.pod
1219
lib/HTML/TreeBuilder.pm
13-
Makefile.PL
14-
MANIFEST
15-
META.json
16-
META.yml
17-
README
20+
t/00-all_prereqs.t
1821
t/00system.t
1922
t/assubs.t
2023
t/attributes.t
@@ -39,7 +42,6 @@ t/subclass.t
3942
t/tag-rendering.t
4043
t/unicode.t
4144
t/whitespace.t
42-
TODO
4345
xt/author/zz_perlcritic.t
44-
xt/author/zz_pod-coverage.t
45-
xt/author/zz_pod.t
46+
xt/release/pod-coverage.t
47+
xt/release/pod-syntax.t

README

+12-8
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,22 @@ The modules and documentation present in this collection are:
4343

4444
INSTALLATION
4545

46-
Just follow the usual procedure:
47-
perl Build.PL
48-
./Build
49-
./Build test
50-
./Build install
46+
To install this module, run the following commands:
47+
48+
{{ $t->build_instructions }}
49+
50+
51+
52+
DEPENDENCIES
53+
54+
{{ $t->dependency_list }}
55+
5156

5257

5358
SOURCE
5459

55-
The source is now kept at
56-
* https://github.com/jfearn/HTML-Tree
57-
* https://github.com/madsen/HTML-Tree
60+
The source is now kept at {{ $meta{resources}{repository}{web}
61+
// die 'no repo' }}
5862

5963

6064

dist.ini

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
; -*-conf-windows-*-
2+
name = HTML-Tree
3+
abstract = Work with HTML in a DOM-like tree structure
4+
author = Christopher J. Madsen <[email protected]>
5+
author = Jeff Fearn <[email protected]>
6+
license = Perl_5
7+
copyright_holder = Gisle Aas
8+
copyright_year = 1998
9+
10+
[Git::GatherDir]
11+
[ManifestSkip]
12+
[MetaJSON]
13+
[MetaYAML]
14+
[MetaConfig]
15+
[License]
16+
[MatchManifest]
17+
[CheckChangesHasContent]
18+
[Test::PrereqsFromMeta]
19+
[PodSyntaxTests]
20+
[PodCoverageTests]
21+
[ModuleBuild::Custom]
22+
mb_version = 0.2808
23+
[RecommendedPrereqs]
24+
[CheckPrereqsIndexed]
25+
26+
[OurPkgVersion]
27+
finder = FilesToWeave
28+
29+
[TemplateCJM]
30+
finder = FilesToWeave
31+
report_versions = 0 ; using OurPkgVersion in this dist
32+
33+
[PodWeaver]
34+
; authordep Pod::Weaver::Plugin::EnsureUniqueSections
35+
; authordep Pod::Weaver::Section::AllowOverride
36+
; authordep Pod::Weaver::Section::Template
37+
finder = FilesToWeave
38+
[FileFinder::Filter / FilesToWeave]
39+
finder = :InstallModules
40+
finder = :ExecFiles
41+
skip = ^lib/HTML/Tree/.*\.pod$ ; TPJ articles
42+
43+
[Repository]
44+
git_remote = github
45+
46+
[NextRelease]
47+
:version = 4.300018 ; Need %T & %U formats
48+
format = %-8v %{yyyy-MM-dd}d%n %{Trial }TRelease by %U
49+
50+
[Git::NextVersion]
51+
version_regexp = ^(\d+\.[\d_]+)(?:-TRIAL)?$
52+
53+
[@Git]
54+
allow_dirty = Changes
55+
commit_msg = Updated Changes for %{MMMM d, yyyy}d%{ trial}t release of %v
56+
tag_format = %v%t
57+
tag_message = Tagged %N %v%{ (trial release)}t
58+
push_to = github master
59+
60+
[Git::CheckFor::CorrectBranch / GitBranch]
61+
[RunExtraTests]
62+
[TestRelease]
63+
[UploadToCPAN]
64+
[ArchiveRelease]
65+
[ConfirmRelease]
66+
67+
[AutoPrereqs]
68+
skip = ^(?:constant|lib|strict|utf8|vars|warnings)$
69+
skip = ^(?:HTML::FormatText|LWP::UserAgent|URI::file)$
70+
71+
[MetaNoIndex]
72+
dir = inc
73+
dir = t

inc/My_Build.pm

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#---------------------------------------------------------------------
2+
package inc::My_Build;
3+
#
4+
# Copyright 2012 Christopher J. Madsen
5+
#
6+
# Author: Christopher J. Madsen <[email protected]>
7+
# Created: 31 May 2012
8+
#
9+
# This program is free software; you can redistribute it and/or modify
10+
# it under the same terms as Perl itself.
11+
#
12+
# This program is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the
15+
# GNU General Public License or the Artistic License for more details.
16+
#
17+
# Customize Module::Build for HTML-Tree
18+
#---------------------------------------------------------------------
19+
20+
use 5.008;
21+
use strict;
22+
use Module::Build ();
23+
24+
our @ISA = ('Module::Build');
25+
26+
#=====================================================================
27+
28+
sub prereq_failures
29+
{
30+
my $self = shift @_;
31+
32+
my $out = $self->SUPER::prereq_failures(@_);
33+
34+
return $out unless $out and $out->{recommends};
35+
36+
my @missing = sort keys %{ $out->{recommends} };
37+
38+
my %about = (
39+
'HTML::FormatText' => "HTML::Element's\n" .
40+
' "format" method, which converts HTML to formatted plain text.',
41+
42+
'LWP::UserAgent' => "HTML::TreeBuilder's\n" .
43+
' "new_from_url" method, which fetches a document given its URL.',
44+
);
45+
46+
for my $module (@missing) {
47+
$out->{recommends}{$missing[-1]}{message} .=
48+
"\n\n $module is only required if you want to use $about{$module}"
49+
if $about{$module};
50+
}
51+
52+
$out->{recommends}{$missing[-1]}{message} .= sprintf
53+
"\n\n If you install %s later, you do NOT need to reinstall HTML-Tree.",
54+
(@missing == 1) ? 'this module' : 'these modules';
55+
56+
return $out;
57+
} # end prereq_failures
58+
59+
#=====================================================================
60+
# Package Return Value:
61+
62+
1;

lib/HTML/AsSubs.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ use warnings;
7272
use strict;
7373
use vars qw(@ISA @EXPORT);
7474

75-
our $VERSION = '5.04';
75+
# VERSION from OurPkgVersion
7676

7777
require HTML::Element;
7878
require Exporter;

0 commit comments

Comments
 (0)