@@ -1,5 +1,10 @@
Revision history for Pod-Coverage-TrustPod
+0.100003 2013-11-05 18:54:26 America/New_York
+ the string *EVERYTHING* is now a pattern meaning "trust everything"
+
+ only anchor the regex from Pod; trustme regex are again non-anchored
+
0.100002 2012-04-20 22:55:04 America/New_York
add docs about using =for instead of =begin/=end
@@ -1,4 +1,4 @@
-This software is copyright (c) 2012 by Ricardo SIGNES.
+This software is copyright (c) 2013 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@ b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
-This software is Copyright (c) 2012 by Ricardo SIGNES.
+This software is Copyright (c) 2013 by Ricardo SIGNES.
This is free software, licensed under:
@@ -272,7 +272,7 @@ That's all there is to it!
--- The Artistic License 1.0 ---
-This software is Copyright (c) 2012 by Ricardo SIGNES.
+This software is Copyright (c) 2013 by Ricardo SIGNES.
This is free software, licensed under:
@@ -7,11 +7,15 @@ Makefile.PL
README
dist.ini
lib/Pod/Coverage/TrustPod.pm
+t/000-report-versions-tiny.t
t/basic.t
t/eg/BaseWithNoPod.pm
t/eg/ChildWithPod.pm
t/eg/NoCoverage.pm
t/eg/PodFor.pm
t/eg/PodPrivate.pm
+t/eg/TrustMe.pm
+t/eg/TrustStar.pm
t/no-pod-parent.t
-t/release-pod-syntax.t
+xt/release/changes_has_content.t
+xt/release/pod-syntax.t
@@ -4,7 +4,7 @@
"Ricardo SIGNES <rjbs@cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.300015, CPAN::Meta::Converter version 2.120921",
+ "generated_by" : "Dist::Zilla version 5.005, CPAN::Meta::Converter version 2.132830",
"license" : [
"perl_5"
],
@@ -19,6 +19,12 @@
"ExtUtils::MakeMaker" : "6.30"
}
},
+ "develop" : {
+ "requires" : {
+ "Test::Pod" : "1.41",
+ "version" : "0.9901"
+ }
+ },
"runtime" : {
"requires" : {
"Pod::Coverage::CountParents" : "0",
@@ -31,126 +37,153 @@
},
"test" : {
"requires" : {
- "Test::More" : "0.96"
+ "Test::More" : "0.96",
+ "lib" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
- "homepage" : "https://github.com/rjbs/pod-coverage-trustpod",
+ "bugtracker" : {
+ "web" : "https://github.com/rjbs/Pod-Coverage-TrustPod/issues"
+ },
+ "homepage" : "https://github.com/rjbs/Pod-Coverage-TrustPod",
"repository" : {
"type" : "git",
- "url" : "https://github.com/rjbs/pod-coverage-trustpod.git",
- "web" : "https://github.com/rjbs/pod-coverage-trustpod"
+ "url" : "https://github.com/rjbs/Pod-Coverage-TrustPod.git",
+ "web" : "https://github.com/rjbs/Pod-Coverage-TrustPod"
}
},
- "version" : "0.100002",
+ "version" : "0.100003",
"x_Dist_Zilla" : {
+ "perl" : {
+ "version" : "5.019005"
+ },
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::Git::GatherDir",
"name" : "@Filter/Git::GatherDir",
- "version" : "1.121010"
+ "version" : "2.017"
},
{
"class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
"name" : "@Filter/CheckPrereqsIndexed",
- "version" : "0.007"
+ "version" : "0.009"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::CheckExtraTests",
+ "name" : "@Filter/CheckExtraTests",
+ "version" : "0.015"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::PromptIfStale",
+ "name" : "@Filter/RJBS-Outdated",
+ "version" : "0.009"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::PromptIfStale",
+ "name" : "@Filter/CPAN-Outdated",
+ "version" : "0.009"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@Filter/@Filter/PruneCruft",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@Filter/@Filter/ManifestSkip",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@Filter/@Filter/MetaYAML",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@Filter/@Filter/License",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@Filter/@Filter/Readme",
- "version" : "4.300015"
- },
- {
- "class" : "Dist::Zilla::Plugin::ExtraTests",
- "name" : "@Filter/@Filter/ExtraTests",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@Filter/@Filter/ExecDir",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@Filter/@Filter/ShareDir",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"name" : "@Filter/@Filter/MakeMaker",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@Filter/@Filter/Manifest",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@Filter/@Filter/TestRelease",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@Filter/@Filter/ConfirmRelease",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@Filter/@Filter/UploadToCPAN",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::Git::NextVersion",
"name" : "@Filter/Git::NextVersion",
- "version" : "1.121010"
+ "version" : "2.017"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@Filter/PkgVersion",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@Filter/MetaConfig",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@Filter/MetaJSON",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@Filter/NextRelease",
- "version" : "4.300015"
+ "version" : "5.005"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent",
+ "name" : "@Filter/Test::ChangesHasContent",
+ "version" : "0.006"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@Filter/PodSyntaxTests",
- "version" : "4.300015"
+ "version" : "5.005"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::ReportVersions::Tiny",
+ "name" : "@Filter/ReportVersions::Tiny",
+ "version" : "1.10"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -161,42 +194,51 @@
}
},
"name" : "@Filter/TestMoreWithSubtests",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
+ "config" : {
+ "Dist::Zilla::Plugin::PodWeaver" : {
+ "config_plugin" : "@RJBS",
+ "finder" : [
+ ":InstallModules",
+ ":ExecFiles"
+ ]
+ }
+ },
"name" : "@Filter/PodWeaver",
- "version" : "3.101641"
+ "version" : "4.001"
},
{
"class" : "Dist::Zilla::Plugin::GithubMeta",
"name" : "@Filter/GithubMeta",
- "version" : "0.28"
+ "version" : "0.42"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"name" : "@Filter/@Git/Check",
- "version" : "1.121010"
+ "version" : "2.017"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"name" : "@Filter/@Git/Commit",
- "version" : "1.121010"
+ "version" : "2.017"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
"name" : "@Filter/@Git/Tag",
- "version" : "1.121010"
+ "version" : "2.017"
},
{
"class" : "Dist::Zilla::Plugin::Git::Push",
"name" : "@Filter/@Git/Push",
- "version" : "1.121010"
+ "version" : "2.017"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "AutoPrereqs",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::RemovePrereqs",
@@ -208,37 +250,37 @@
}
},
"name" : "RemovePrereqs",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "4.300015"
+ "version" : "5.005"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
- "version" : "4.300015"
+ "version" : "5.005"
}
],
"zilla" : {
@@ -246,7 +288,7 @@
"config" : {
"is_trial" : "0"
},
- "version" : "4.300015"
+ "version" : "5.005"
}
}
}
@@ -4,10 +4,11 @@ author:
- 'Ricardo SIGNES <rjbs@cpan.org>'
build_requires:
Test::More: 0.96
+ lib: 0
configure_requires:
ExtUtils::MakeMaker: 6.30
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.300015, CPAN::Meta::Converter version 2.120921'
+generated_by: 'Dist::Zilla version 5.005, CPAN::Meta::Converter version 2.132830'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -21,95 +22,114 @@ requires:
strict: 0
warnings: 0
resources:
- homepage: https://github.com/rjbs/pod-coverage-trustpod
- repository: https://github.com/rjbs/pod-coverage-trustpod.git
-version: 0.100002
+ bugtracker: https://github.com/rjbs/Pod-Coverage-TrustPod/issues
+ homepage: https://github.com/rjbs/Pod-Coverage-TrustPod
+ repository: https://github.com/rjbs/Pod-Coverage-TrustPod.git
+version: 0.100003
x_Dist_Zilla:
+ perl:
+ version: 5.019005
plugins:
-
class: Dist::Zilla::Plugin::Git::GatherDir
name: '@Filter/Git::GatherDir'
- version: 1.121010
+ version: 2.017
-
class: Dist::Zilla::Plugin::CheckPrereqsIndexed
name: '@Filter/CheckPrereqsIndexed'
- version: 0.007
+ version: 0.009
+ -
+ class: Dist::Zilla::Plugin::CheckExtraTests
+ name: '@Filter/CheckExtraTests'
+ version: 0.015
+ -
+ class: Dist::Zilla::Plugin::PromptIfStale
+ name: '@Filter/RJBS-Outdated'
+ version: 0.009
+ -
+ class: Dist::Zilla::Plugin::PromptIfStale
+ name: '@Filter/CPAN-Outdated'
+ version: 0.009
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@Filter/@Filter/PruneCruft'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@Filter/@Filter/ManifestSkip'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@Filter/@Filter/MetaYAML'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::License
name: '@Filter/@Filter/License'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::Readme
name: '@Filter/@Filter/Readme'
- version: 4.300015
- -
- class: Dist::Zilla::Plugin::ExtraTests
- name: '@Filter/@Filter/ExtraTests'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::ExecDir
name: '@Filter/@Filter/ExecDir'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::ShareDir
name: '@Filter/@Filter/ShareDir'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::MakeMaker
name: '@Filter/@Filter/MakeMaker'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::Manifest
name: '@Filter/@Filter/Manifest'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::TestRelease
name: '@Filter/@Filter/TestRelease'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@Filter/@Filter/ConfirmRelease'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@Filter/@Filter/UploadToCPAN'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::Git::NextVersion
name: '@Filter/Git::NextVersion'
- version: 1.121010
+ version: 2.017
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@Filter/PkgVersion'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@Filter/MetaConfig'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@Filter/MetaJSON'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::NextRelease
name: '@Filter/NextRelease'
- version: 4.300015
+ version: 5.005
+ -
+ class: Dist::Zilla::Plugin::Test::ChangesHasContent
+ name: '@Filter/Test::ChangesHasContent'
+ version: 0.006
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@Filter/PodSyntaxTests'
- version: 4.300015
+ version: 5.005
+ -
+ class: Dist::Zilla::Plugin::ReportVersions::Tiny
+ name: '@Filter/ReportVersions::Tiny'
+ version: 1.10
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -117,35 +137,41 @@ x_Dist_Zilla:
phase: test
type: requires
name: '@Filter/TestMoreWithSubtests'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::PodWeaver
+ config:
+ Dist::Zilla::Plugin::PodWeaver:
+ config_plugin: '@RJBS'
+ finder:
+ - ':InstallModules'
+ - ':ExecFiles'
name: '@Filter/PodWeaver'
- version: 3.101641
+ version: 4.001
-
class: Dist::Zilla::Plugin::GithubMeta
name: '@Filter/GithubMeta'
- version: 0.28
+ version: 0.42
-
class: Dist::Zilla::Plugin::Git::Check
name: '@Filter/@Git/Check'
- version: 1.121010
+ version: 2.017
-
class: Dist::Zilla::Plugin::Git::Commit
name: '@Filter/@Git/Commit'
- version: 1.121010
+ version: 2.017
-
class: Dist::Zilla::Plugin::Git::Tag
name: '@Filter/@Git/Tag'
- version: 1.121010
+ version: 2.017
-
class: Dist::Zilla::Plugin::Git::Push
name: '@Filter/@Git/Push'
- version: 1.121010
+ version: 2.017
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: AutoPrereqs
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::RemovePrereqs
config:
@@ -153,33 +179,33 @@ x_Dist_Zilla:
modules_to_remove:
- Carp::Heavy
name: RemovePrereqs
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 4.300015
+ version: 5.005
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
- version: 4.300015
+ version: 5.005
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
- version: 4.300015
+ version: 5.005
@@ -11,9 +11,7 @@ use ExtUtils::MakeMaker 6.30;
my %WriteMakefileArgs = (
"ABSTRACT" => "allow a module's pod to contain Pod::Coverage hints",
"AUTHOR" => "Ricardo SIGNES <rjbs\@cpan.org>",
- "BUILD_REQUIRES" => {
- "Test::More" => "0.96"
- },
+ "BUILD_REQUIRES" => {},
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.30"
},
@@ -29,24 +27,33 @@ my %WriteMakefileArgs = (
"strict" => 0,
"warnings" => 0
},
- "VERSION" => "0.100002",
+ "TEST_REQUIRES" => {
+ "Test::More" => "0.96",
+ "lib" => 0
+ },
+ "VERSION" => "0.100003",
"test" => {
"TESTS" => "t/*.t"
}
);
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
- my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
- my $pp = $WriteMakefileArgs{PREREQ_PM};
- for my $mod ( keys %$br ) {
- if ( exists $pp->{$mod} ) {
- $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
- }
- else {
- $pp->{$mod} = $br->{$mod};
- }
- }
+my %FallbackPrereqs = (
+ "Pod::Coverage::CountParents" => 0,
+ "Pod::Eventual::Simple" => 0,
+ "Pod::Find" => 0,
+ "Test::More" => "0.96",
+ "base" => 0,
+ "lib" => 0,
+ "strict" => 0,
+ "warnings" => 0
+);
+
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
+ delete $WriteMakefileArgs{TEST_REQUIRES};
+ delete $WriteMakefileArgs{BUILD_REQUIRES};
+ $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
@@ -1,11 +1,11 @@
This archive contains the distribution Pod-Coverage-TrustPod,
-version 0.100002:
+version 0.100003:
allow a module's pod to contain Pod::Coverage hints
-This software is copyright (c) 2012 by Ricardo SIGNES.
+This software is copyright (c) 2013 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -2,7 +2,7 @@ use strict;
use warnings;
package Pod::Coverage::TrustPod;
{
- $Pod::Coverage::TrustPod::VERSION = '0.100002';
+ $Pod::Coverage::TrustPod::VERSION = '0.100003';
}
use base 'Pod::Coverage::CountParents';
# ABSTRACT: allow a module's pod to contain Pod::Coverage hints
@@ -20,7 +20,7 @@ sub __get_pod_trust {
@parents = @{"$package\::ISA"};
}
- return $collect unless my $file = pod_where( { -inc => 1 }, $package );
+ return $collect unless my $file = pod_where( { -inc => 1 }, $package );
my $output = Pod::Eventual::Simple->read_file($file);
@@ -53,12 +53,16 @@ sub _trustme_check {
{}
);
- return grep { $sym =~ /\A$_\z/ } @{ $self->{trustme} }, keys %$from_pod;
+ return 1 if $from_pod->{'*EVERYTHING*'};
+ return 1 if $self->SUPER::_trustme_check($sym);
+ return 1 if grep { $sym =~ /\A$_\z/ } keys %$from_pod;
+ return;
}
1;
__END__
+
=pod
=head1 NAME
@@ -67,7 +71,7 @@ Pod::Coverage::TrustPod - allow a module's pod to contain Pod::Coverage hints
=head1 VERSION
-version 0.100002
+version 0.100003
=head1 DESCRIPTION
@@ -121,16 +125,22 @@ instead write:
=for Pod::Coverage foo
+In some cases, you may wish to make the entire file trusted. The special
+pattern C<*EVERYTHING*> may be provided to do just this.
+
+Keep in mind that Pod::Coverage::TrustPod sets up exceptions using the "trust"
+mechanism rather than the "privacy" mechanism in Pod::Coverage. This is
+unlikely ever to matter to you, but it's true.
+
=head1 AUTHOR
Ricardo SIGNES <rjbs@cpan.org>
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2012 by Ricardo SIGNES.
+This software is copyright (c) 2013 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
-
@@ -0,0 +1,78 @@
+use strict;
+use warnings;
+use Test::More 0.88;
+# This is a relatively nice way to avoid Test::NoWarnings breaking our
+# expectations by adding extra tests, without using no_plan. It also helps
+# avoid any other test module that feels introducing random tests, or even
+# test plans, is a nice idea.
+our $success = 0;
+END { $success && done_testing; }
+
+# List our own version used to generate this
+my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.10\n";
+
+eval { # no excuses!
+ # report our Perl details
+ my $want = "any version";
+ $v .= "perl: $] (wanted $want) on $^O from $^X\n\n";
+};
+defined($@) and diag("$@");
+
+# Now, our module version dependencies:
+sub pmver {
+ my ($module, $wanted) = @_;
+ $wanted = " (want $wanted)";
+ my $pmver;
+ eval "require $module;";
+ if ($@) {
+ if ($@ =~ m/Can't locate .* in \@INC/) {
+ $pmver = 'module not found.';
+ } else {
+ diag("${module}: $@");
+ $pmver = 'died during require.';
+ }
+ } else {
+ my $version;
+ eval { $version = $module->VERSION; };
+ if ($@) {
+ diag("${module}: $@");
+ $pmver = 'died during VERSION check.';
+ } elsif (defined $version) {
+ $pmver = "$version";
+ } else {
+ $pmver = '<undef>';
+ }
+ }
+
+ # So, we should be good, right?
+ return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n");
+}
+
+eval { $v .= pmver('ExtUtils::MakeMaker','6.30') };
+eval { $v .= pmver('Pod::Coverage::CountParents','any version') };
+eval { $v .= pmver('Pod::Eventual::Simple','any version') };
+eval { $v .= pmver('Pod::Find','any version') };
+eval { $v .= pmver('Test::More','0.96') };
+eval { $v .= pmver('base','any version') };
+eval { $v .= pmver('lib','any version') };
+eval { $v .= pmver('strict','any version') };
+eval { $v .= pmver('warnings','any version') };
+
+
+# All done.
+$v .= <<'EOT';
+
+Thanks for using my code. I hope it works for you.
+If not, please try and include this output in the bug report.
+That will help me reproduce the issue and solve your problem.
+
+EOT
+
+diag($v);
+ok(1, "we really didn't test anything, just reporting data");
+$success = 1;
+
+# Work around another nasty module on CPAN. :/
+no warnings 'once';
+$Template::Test::NO_FLUSH = 1;
+exit 0;
@@ -33,9 +33,35 @@ require_ok($PC);
{
my $obj = $PC->new(
+ package => 'TrustStar',
+ );
+
+ is($obj->coverage, 1, 'total coverage in TrustStar');
+ }
+
+ {
+ my $obj = $PC->new(
package => 'PodFor',
);
is($obj->coverage, 1, 'total coverage in PodFor');
}
+
+ {
+ my $obj = $PC->new(
+ package => 'TrustMe',
+ trustme => [ qr/zzz/ ],
+ );
+
+ if (! defined $obj->coverage) {
+ diag "no coverage: " . $obj->why_unrated;
+ die;
+ }
+
+ ok(
+ $obj->coverage >= 0.66 && $obj->coverage <= 0.68,
+ "about one third covered in TrustMe",
+ ) or diag "actual coverage: " . $obj->coverage;
+ is_deeply([ $obj->naked ], [ qw(foo_xyz_bar) ], "1 symbol");
+ }
}
@@ -17,4 +17,6 @@ Blah method
sub blah {}
+sub zzz { 'Covered by trustme in tests' }
+
1;
@@ -0,0 +1,21 @@
+
+use strict;
+use warnings;
+
+package TrustMe;
+
+=head1 NAME
+
+TrustMe - we have an anchor-free trustme and anchored =for
+
+=for Pod::Coverage xyz
+
+=cut
+
+sub foo_zzz_bar { }
+
+sub xyz { }
+
+sub foo_xyz_bar { }
+
+1;
@@ -0,0 +1,19 @@
+
+use strict;
+use warnings;
+
+package TrustStar;
+
+=head1 NAME
+
+TrustStar - trust the almight asterisk
+
+=for Pod::Coverage *EVERYTHING*
+
+=cut
+
+sub not_covered { }
+
+sub pants { }
+
+1;
@@ -1,15 +0,0 @@
-#!perl
-
-BEGIN {
- unless ($ENV{RELEASE_TESTING}) {
- require Test::More;
- Test::More::plan(skip_all => 'these tests are for release candidate testing');
- }
-}
-
-use Test::More;
-
-eval "use Test::Pod 1.41";
-plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
-
-all_pod_files_ok();
@@ -0,0 +1,41 @@
+#!perl
+
+use Test::More tests => 2;
+
+note 'Checking Changes';
+my $changes_file = 'Changes';
+my $newver = '0.100003';
+my $trial_token = '-TRIAL';
+
+SKIP: {
+ ok(-e $changes_file, "$changes_file file exists")
+ or skip 'Changes is missing', 1;
+
+ ok(_get_changes($newver), "$changes_file has content for $newver");
+}
+
+done_testing;
+
+# _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit
+# by Jerome Quelin
+sub _get_changes
+{
+ my $newver = shift;
+
+ # parse changelog to find commit message
+ open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!";
+ my $changelog = join('', <$fh>);
+ close $fh;
+
+ my @content =
+ grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented
+ split /\n/, $changelog;
+ shift @content; # drop the version line
+
+ # drop unindented last line and trailing blank lines
+ pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ );
+
+ # return number of non-blank lines
+ return scalar @content;
+}
+
@@ -0,0 +1,7 @@
+#!perl
+use Test::More;
+
+eval "use Test::Pod 1.41";
+plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
+
+all_pod_files_ok();