Skip Menu |

This queue is for tickets about the Pod-Coverage CPAN distribution.

Report information
The Basics
Id: 14635
Status: resolved
Priority: 0/
Queue: Pod-Coverage

People
Owner: Nobody in particular
Requestors: abeltje [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.17
Fixed in: (no value)



Subject: detect bare fully qualified name descriptions
Hi, Coverage isn't detected when a sub name is fully qualified and bare: =item Fully::Qualified::sub1 or, with space between name and '(' =item Fully::Qualified::sub2 ( $arg ) attached patch allows this and adds a test for it HTH + Good luck, -- Abe.
diff -ruN Pod-Coverage-0.17/MANIFEST Pod-Coverage-0.17_01/MANIFEST --- Pod-Coverage-0.17/MANIFEST Tue Nov 23 15:21:56 2004 +++ Pod-Coverage-0.17_01/MANIFEST Sun Sep 18 13:36:39 2005 @@ -36,5 +36,6 @@ t/lib/Trustme.pm t/lib/Tie.pm t/lib/XS4ALL.pm +t/lib/Fully/Qualified.pm examples/check_installed examples/script-covered diff -ruN Pod-Coverage-0.17/lib/Pod/Coverage.pm Pod-Coverage-0.17_01/lib/Pod/Coverage.pm --- Pod-Coverage-0.17/lib/Pod/Coverage.pm Tue Nov 23 15:21:56 2004 +++ Pod-Coverage-0.17_01/lib/Pod/Coverage.pm Sun Sep 18 13:59:57 2005 @@ -372,6 +372,8 @@ # it's dressed up like a method cal $pod =~ /-E<\s*gt\s*>(.*)/ and $pod = $1; $pod =~ /->(.*)/ and $pod = $1; + # it's used as a (bare) fully qualified name + $pod =~ /\w+(?:::\w+)*::(\w+)/ and $pod = $1; # it's wrapped in a pod style B<> $pod =~ s/[A-Z]<//g; $pod =~ s/>//g; diff -ruN Pod-Coverage-0.17/t/02simple.t Pod-Coverage-0.17_01/t/02simple.t --- Pod-Coverage-0.17/t/02simple.t Tue Nov 23 15:21:56 2004 +++ Pod-Coverage-0.17_01/t/02simple.t Sun Sep 18 14:00:59 2005 @@ -1,6 +1,6 @@ #!/usr/bin/perl -w use strict; -use Test::More tests => 32; +use Test::More tests => 33; use lib 't/lib'; BEGIN { @@ -79,3 +79,6 @@ $obj = Pod::Coverage->new( package => 'XS4ALL' ); is( $obj->coverage, 1, "XS4ALL is covered" ); + +$obj = Pod::Coverage->new( package => 'Fully::Qualified' ); +is( $obj->coverage, 1, "Fully::Qualified is covered" ); diff -ruN Pod-Coverage-0.17/t/lib/Fully/Qualified.pm Pod-Coverage-0.17_01/t/lib/Fully/Qualified.pm --- Pod-Coverage-0.17/t/lib/Fully/Qualified.pm Thu Jan 1 01:00:00 1970 +++ Pod-Coverage-0.17_01/t/lib/Fully/Qualified.pm Sun Sep 18 13:57:13 2005 @@ -0,0 +1,44 @@ +package Fully::Qualified; +use strict; +use warnings; + +use vars qw( $VERSION @EXPORT_OK ); +$VERSION=0.001; + +use base 'Exporter'; +@EXPORT_OK = qw( &ex_sub2 ); + +=head1 NAME + +Fully::Qualified - Test for Pod::Coverage + +=head1 SYNOPSIS + +none + +=head1 DESCRIPTION + +This package is to see that L<Pod::Coverage> sees fully qualified subnames as documented. (Not all the world is OO) + +=over 4 + +=item C<Fully::Qualified::api_sub1 ( noargs )> + +Okay, it is API; but not exported + +=cut + +sub api_sub1 { "in api_sub1" } + +=item Fully::Qualified::ex_sub2 + +This sub can be exported. + +=cut + +sub ex_sub2 { "in ex_sub2" } + +=back + +=cut +
On Sun Sep 18 08:19:51 2005, ABELTJE wrote: Show quoted text
> Hi, > > Coverage isn't detected when a sub name is fully qualified and bare: > > =item Fully::Qualified::sub1 > > or, with space between name and '(' > > =item Fully::Qualified::sub2 ( $arg ) > > attached patch allows this and adds a test for it
Thanks, the next release will include this patch. -- Richard Clamp <richardc@unixbeard.net>