not a solution but maybe something helpfull. You know I'm not an expert, just writing my first serious modules, but why your other classes are not in their own files? The assumption My::Module lives in @INC/My/Module.pm is a convention so widely used that at the end is a rule and a limitation. It seems Pod::Coverage too assumes this design. ( PS if your modules works fine why to care about Pod::Coverage ? ;)
That said I looked at source and pod_from comes from Pod::Find that describe itself with: NOTE: This module is considered legacy;
You can use sub Pod::Coverage::TRACE_ALL] () { 1 } to show where Pod::Coverage looks and, yes, I hacked it to force looking in the current file with pod_from => 'podcovtest.pm' but it fails requiring the package: requiring 'Segment' require failed with Can't locate Segment.pm in @INC
A semplified example (you forgot to return true ;) inside the file podcovtest.pm
use strict; use warnings; package Segment; sub new { 1 } sub Describe { 1 } package podcovtest; sub new { 1 } sub Describe { 1 } sub Pod::Coverage::TRACE_ALL () { 1 } use Pod::Coverage; foreach my $pkg ( qw( Segment podcovtest ) ){ my $pc = Pod::Coverage->new(package => $pkg, pod_from => 'podc +ovtest.pm'); print qq(OK $pkg\n) if $pc->coverage == 1; } 1; =pod =head1 NAME Segment =head2 Describe =head1 NAME podcovtest =head2 new =head2 Describe =head1 VERSION =head1 USAGE =item C<new(%params)> C<new(...)> creates a new ELF::File object and parses the Program Head +er table and the Section Header table. =item C<Describe()> C<Describe()> returns a multi-line string describing the ELF file head +er contents. =cut
and its output:
>perl -I . -Mpodcovtest -e 1 getting pod location for 'Segment' parsing 'podcovtest.pm' requiring 'Segment' require failed with Can't locate Segment.pm in @INC (you may need to i +nstall the Segment module) (@INC contains: . C:/EX_D/ulisseDUE/perl5. +26.64bit/perl/site/lib/MSWin32-x64-multi-thread C:/EX_D/ulisseDUE/per +l5.26.64bit/perl/site/lib C:/EX_D/ulisseDUE/perl5.26.64bit/perl/vendo +r/lib C:/EX_D/ulisseDUE/perl5.26.64bit/perl/lib) at (eval 8) line 1. Use of uninitialized value in numeric eq (==) at podcovtest.pm line 19 +. getting pod location for 'podcovtest' parsing 'podcovtest.pm' requiring 'podcovtest' walking symbols tying shoelaces $VAR1 = bless( { 'package' => 'podcovtest', 'nonwhitespace' => undef, 'private' => [ qr/^_/, qr/^(un)?import$/, qr/^DESTROY$/, qr/^AUTOLOAD$/, qr/^bootstrap$/, qr/^\(/, qr/^(TIE( SCALAR | ARRAY | HASH | HAND +LE ) | FETCH | STORE | UNTIE | FETCHSIZE | STORESIZE | POP | PUSH | SHIFT | UNSHIFT | SPLICE | DELETE | EXISTS | EXTEND | CLEAR | FIRSTKEY | NEXTKEY | PRINT | PR +INTF | WRITE | READLINE | GETC | READ | CLOSE | BINMODE | OPEN | EOF | FILENO | SEEK | TELL | SCALAR )$/x, qr/^( MODIFY | FETCH )_( REF | SCALAR +| ARRAY | HASH | CODE | GLOB | FORMAT | IO)_ATTRIBUTES $/x, qr/^CLONE(_SKIP)?$/ ], 'trustme' => [], 'pod_from' => 'podcovtest.pm', 'symbols' => { 'new' => 1, 'Describe' => 1 } }, 'Pod::Coverage' ); OK podcovtest
L*
In reply to Re: Pod::Coverage for helper classes
by Discipulus
in thread Pod::Coverage for helper classes
by GrandFather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |