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 => 'podcovtest.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 C creates a new ELF::File object and parses the Program Header table and the Section Header table. =item C C returns a multi-line string describing the ELF file header contents. =cut #### >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 install the Segment module) (@INC contains: . C:/EX_D/ulisseDUE/perl5.26.64bit/perl/site/lib/MSWin32-x64-multi-thread C:/EX_D/ulisseDUE/perl5.26.64bit/perl/site/lib C:/EX_D/ulisseDUE/perl5.26.64bit/perl/vendor/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 | HANDLE ) | FETCH | STORE | UNTIE | FETCHSIZE | STORESIZE | POP | PUSH | SHIFT | UNSHIFT | SPLICE | DELETE | EXISTS | EXTEND | CLEAR | FIRSTKEY | NEXTKEY | PRINT | PRINTF | 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