r2088 - in packages/libtest-pod-coverage-perl/trunk: . debian t
Niko Tyni
ntyni-guest at costa.debian.org
Thu Feb 2 21:34:31 UTC 2006
Author: ntyni-guest
Date: 2006-02-02 21:34:28 +0000 (Thu, 02 Feb 2006)
New Revision: 2088
Added:
packages/libtest-pod-coverage-perl/trunk/t/PC_Inherited.pm
packages/libtest-pod-coverage-perl/trunk/t/PC_Inherits.pm
packages/libtest-pod-coverage-perl/trunk/t/alt_class.t
Modified:
packages/libtest-pod-coverage-perl/trunk/Changes
packages/libtest-pod-coverage-perl/trunk/Coverage.pm
packages/libtest-pod-coverage-perl/trunk/MANIFEST
packages/libtest-pod-coverage-perl/trunk/META.yml
packages/libtest-pod-coverage-perl/trunk/debian/changelog
Log:
svn-upgrade to 1.08
Modified: packages/libtest-pod-coverage-perl/trunk/Changes
===================================================================
--- packages/libtest-pod-coverage-perl/trunk/Changes 2006-02-02 21:33:54 UTC (rev 2087)
+++ packages/libtest-pod-coverage-perl/trunk/Changes 2006-02-02 21:34:28 UTC (rev 2088)
@@ -1,12 +1,24 @@
Revision history for Test::Pod::Coverage
-1.06 Tue Jun 22 16:51:42 CDT 2004
- [ENHANCEMENTS]
- * Looks in blib/ if there is one, otherwise looks in lib/
- * Doesn't report "no public symbols" unless verbose mode is on.
- * Thanks to David Wheeler and Shawn Sorichetti for nudging.
- This behavior will be in Test::Pod soon, too.
+1.08 Wed Jan 25 21:59:49 CST 2006
+ [FIXES]
+ * File and directory names may now contain periods and hyphens.
+ * Now exports all_modules().
+1.07_01 Wed Dec 28 23:10:31 CST 2005
+ [ENHANCEMENTS]
+ * Can now use an alternate class that implements the Pod::Coverage
+ interface. This is mostly useful for avoiding the necessity to
+ redocument or itemize overriden methods in a subclass by using
+ Pod::Coverage::CountParents. Thanks to Ricardo Signes.
+
+1.06 Tue Jun 22 16:51:42 CDT 2004
+ [ENHANCEMENTS]
+ * Looks in blib/ if there is one, otherwise looks in lib/
+ * Doesn't report "no public symbols" unless verbose mode is on.
+ * Thanks to David Wheeler and Shawn Sorichetti for nudging.
+ This behavior will be in Test::Pod soon, too.
+
1.04 Sat May 1 00:06:14 CDT 2004
[FIXES]
* Now it runs taint-safe. I was not untainting the filename.
Modified: packages/libtest-pod-coverage-perl/trunk/Coverage.pm
===================================================================
--- packages/libtest-pod-coverage-perl/trunk/Coverage.pm 2006-02-02 21:33:54 UTC (rev 2087)
+++ packages/libtest-pod-coverage-perl/trunk/Coverage.pm 2006-02-02 21:34:28 UTC (rev 2088)
@@ -6,13 +6,11 @@
=head1 VERSION
-Version 1.06
+Version 1.08
- $Header: /home/cvs/test-pod-coverage/Coverage.pm,v 1.26 2004/06/22 22:02:06 andy Exp $
-
=cut
-our $VERSION = "1.06";
+our $VERSION = "1.08";
=head1 SYNOPSIS
@@ -43,6 +41,16 @@
pod_coverage_ok( "Mail::SRS::Reversable", $trustme );
pod_coverage_ok( "Mail::SRS::Shortcut", $trustme );
+Alternately, you could use L<Pod::Coverage::CountParents>, which always allows
+a subclass to reimplement its parents' methods without redocumenting them. For
+example:
+
+ my $trustparents = { coverage_class => 'Pod::Coverage::CountParents' };
+ pod_coverage_ok( "IO::Handle::Frayed", $trustparents );
+
+(The C<coverage_class> parameter is not passed to the coverage class with other
+parameters.)
+
If you want POD coverage for your module, but don't want to make
Test::Pod::Coverage a prerequisite for installing, create the following
as your F<t/pod-coverage.t> file:
@@ -79,6 +87,7 @@
no strict 'refs';
*{$caller.'::pod_coverage_ok'} = \&pod_coverage_ok;
*{$caller.'::all_pod_coverage_ok'} = \&all_pod_coverage_ok;
+ *{$caller.'::all_modules'} = \&all_modules;
$Test->exported_to($caller);
$Test->plan(@_);
@@ -86,6 +95,8 @@
=head1 FUNCTIONS
+All functions listed below are exported to the calling namespace.
+
=head2 all_pod_coverage_ok( [$parms, ] $msg )
Checks that the POD code in all modules in the distro have proper POD
@@ -95,6 +106,9 @@
C<Pod::Coverage> object that the function uses. Check the
L<Pod::Coverage> manual for what those can be.
+The exception is the C<coverage_class> parameter, which specifies a class to
+use for coverage testing. It defaults to C<Pod::Coverage>.
+
=cut
sub all_pod_coverage_ok {
@@ -112,7 +126,8 @@
my $thisok = pod_coverage_ok( $module, $parms, $thismsg );
$ok = 0 unless $thisok;
}
- } else {
+ }
+ else {
$Test->plan( tests => 1 );
$Test->ok( 1, "No modules found." );
}
@@ -129,14 +144,21 @@
C<Pod::Coverage> object that the function uses. Check the
L<Pod::Coverage> manual for what those can be.
+The exception is the C<coverage_class> parameter, which specifies a class to
+use for coverage testing. It defaults to C<Pod::Coverage>.
+
=cut
sub pod_coverage_ok {
my $module = shift;
- my $parms = (@_ && (ref $_[0] eq "HASH")) ? shift : {};
+ my %parms = (@_ && (ref $_[0] eq "HASH")) ? %{(shift)} : ();
my $msg = @_ ? shift : "Pod coverage on $module";
- my $pc = Pod::Coverage->new( package => $module, %$parms );
+ my $pc_class = (delete $parms{coverage_class}) || 'Pod::Coverage';
+ eval "require $pc_class" or die $@;
+
+ my $pc = $pc_class->new( package => $module, %parms );
+
my $rating = $pc->coverage;
my $ok;
if ( defined $rating ) {
@@ -150,7 +172,8 @@
$module, $rating*100, scalar @nakies ) );
$Test->diag( "\t$_" ) for @nakies;
}
- } else { # No symbols
+ }
+ else { # No symbols
my $why = $pc->why_unrated;
my $nopublics = ( $why =~ "no public symbols defined" );
my $verbose = $ENV{HARNESS_VERBOSE} || 0;
@@ -165,7 +188,8 @@
=head2 all_modules( [@dirs] )
Returns a list of all modules in I<$dir> and in directories below. If
-no directories are passed, it defaults to "blib".
+no directories are passed, it defaults to F<blib> if F<blib> exists,
+or F<lib> if not.
Note that the modules are as "Foo::Bar", not "Foo/Bar.pm".
@@ -204,9 +228,12 @@
# Untaint the parts
for ( @parts ) {
- /^([a-zA-Z0-9_]+)$/;
- die qq{Invalid and untaintable filename "$file"!} unless $_ eq $1;
- $_ = $1;
+ if ( /^([a-zA-Z0-9_\.\-]+)$/ && ($_ eq $1) ) {
+ $_ = $1; # Untaint the original
+ }
+ else {
+ die qq{Invalid and untaintable filename "$file"!};
+ }
}
my $module = join( "::", @parts );
push( @modules, $module );
@@ -221,14 +248,55 @@
return 'lib';
}
+=head1 BUGS
+
+Please report any bugs or feature requests to
+C<bug-test-pod-coverage at rt.cpan.org>, or through the web interface at
+L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Pod-Coverage>.
+I will be notified, and then you'll automatically be notified of progress on
+your bug as I make changes.
+
+=head1 SUPPORT
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc Test::Pod::Coverage
+
+You can also look for information at:
+
+=over 4
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/Test-Pod-Coverage>
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/d/Test-Pod-Coverage>
+
+=item * RT: CPAN's request tracker
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Pod-Coverage>
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/Test-Pod-Coverage>
+
+=back
+
=head1 AUTHOR
-Written by Andy Lester, C<< <andy at petdance.com> >>.
+Written by Andy Lester, C<< <andy at petdance.com> >>.
-=head1 COPYRIGHT
+=head1 ACKNOWLEDGEMENTS
-Copyright 2004, Andy Lester, All Rights Reserved.
+Thanks to Ricardo Signes for patches, and Richard Clamp for
+writing Pod::Coverage.
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2006, Andy Lester, All Rights Reserved.
+
You may use, modify, and distribute this package under the
same terms as Perl itself.
Modified: packages/libtest-pod-coverage-perl/trunk/MANIFEST
===================================================================
--- packages/libtest-pod-coverage-perl/trunk/MANIFEST 2006-02-02 21:33:54 UTC (rev 2087)
+++ packages/libtest-pod-coverage-perl/trunk/MANIFEST 2006-02-02 21:34:28 UTC (rev 2088)
@@ -5,6 +5,9 @@
Makefile.PL
t/00.load.t
t/all_pod_coverage_ok.t
+t/alt_class.t
+t/PC_Inherited.pm
+t/PC_Inherits.pm
t/Nopod.pm
t/Nosymbols.pm
t/Privates.pm
Modified: packages/libtest-pod-coverage-perl/trunk/META.yml
===================================================================
--- packages/libtest-pod-coverage-perl/trunk/META.yml 2006-02-02 21:33:54 UTC (rev 2087)
+++ packages/libtest-pod-coverage-perl/trunk/META.yml 2006-02-02 21:34:28 UTC (rev 2088)
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Test-Pod-Coverage
-version: 1.06
+version: 1.08
version_from: Coverage.pm
installdirs: site
requires:
@@ -10,4 +10,4 @@
Test::More: 0
distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.21
+generated_by: ExtUtils::MakeMaker version 6.30
Modified: packages/libtest-pod-coverage-perl/trunk/debian/changelog
===================================================================
--- packages/libtest-pod-coverage-perl/trunk/debian/changelog 2006-02-02 21:33:54 UTC (rev 2087)
+++ packages/libtest-pod-coverage-perl/trunk/debian/changelog 2006-02-02 21:34:28 UTC (rev 2088)
@@ -1,3 +1,9 @@
+libtest-pod-coverage-perl (1.08-1) UNRELEASED; urgency=low
+
+ * (NOT RELEASED YET) New upstream release
+
+ -- Niko Tyni <ntyni at iki.fi> Thu, 2 Feb 2006 23:34:03 +0200
+
libtest-pod-coverage-perl (1.06-2) unstable; urgency=low
* Added debian/watch
Copied: packages/libtest-pod-coverage-perl/trunk/t/PC_Inherited.pm (from rev 2087, packages/libtest-pod-coverage-perl/branches/upstream/current/t/PC_Inherited.pm)
Copied: packages/libtest-pod-coverage-perl/trunk/t/PC_Inherits.pm (from rev 2087, packages/libtest-pod-coverage-perl/branches/upstream/current/t/PC_Inherits.pm)
Copied: packages/libtest-pod-coverage-perl/trunk/t/alt_class.t (from rev 2087, packages/libtest-pod-coverage-perl/branches/upstream/current/t/alt_class.t)
More information about the Pkg-perl-cvs-commits
mailing list