2 # - Test::Pod::Coverage -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=1.08 '--author=Andy Lester' Test-Pod-Coverage-1.08.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname Test
-Pod
-Coverage
10 %define filelist
%{pkgname}-%{version}-filelist
11 %define NVR
%{pkgname}-%{version}-%{release}
14 name
: perl
-Test
-Pod
-Coverage
15 summary
: Test
-Pod
-Coverage
- Check
for pod coverage
in your distribution
19 packager
: Arix International
<cpan2rpm@arix.com
>
21 group
: Applications
/CPAN
22 url
: http
://www.cpan.org
23 buildroot
: %{_tmppath}/%{name}-%{version}-%
(id
-u
-n
)
25 prefix
: %
(echo %{_prefix})
26 source: Test
-Pod
-Coverage
-1.08.tar.gz
29 Checks
for POD coverage
in files
for your distribution.
31 use Test
::Pod
::Coverage tests
=>1;
32 pod_coverage_ok
( "Foo
::Bar"
, "Foo
::Bar is covered"
);
34 Can also be called with Pod
::Coverage parms.
36 use Test
::Pod
::Coverage tests
=>1;
39 { also_private
=> [ qr
/^
[A
-Z_
]+$
/ ], },
40 "Foo
::Bar
, with all
-caps functions as privates"
,
43 The Pod
::Coverage parms are also useful
for subclasses that don't
44 re
-document the parent class's methods. Here's an example from
47 pod_coverage_ok
( "Mail
::SRS"
); # No exceptions
49 # Define the three overridden methods.
50 my $trustme
= { trustme
=> [qr
/^
(new|parse|compile
)$
/] };
51 pod_coverage_ok
( "Mail
::SRS
::DB"
, $trustme
);
52 pod_coverage_ok
( "Mail
::SRS
::Guarded"
, $trustme
);
53 pod_coverage_ok
( "Mail
::SRS
::Reversable"
, $trustme
);
54 pod_coverage_ok
( "Mail
::SRS
::Shortcut"
, $trustme
);
56 Alternately
, you could use Pod
::Coverage
::CountParents
, which always allows
57 a subclass to reimplement its parents' methods without redocumenting them. For
60 my $trustparents
= { coverage_class
=> 'Pod
::Coverage
::CountParents'
};
61 pod_coverage_ok
( "IO
::Handle
::Frayed"
, $trustparents
);
63 (The "coverage_class" parameter is not passed to the coverage class with other
66 If you want POD coverage
for your module
, but don't want to
make
67 Test
::Pod
::Coverage a prerequisite
for installing
, create the following
68 as your t
/pod
-coverage.t file
:
71 eval "use Test
::Pod
::Coverage"
;
72 plan skip_all
=> "Test
::Pod
::Coverage required
for testing pod coverage"
if $@
;
75 pod_coverage_ok
( "Pod
::Master
::Html"
);
77 Finally
, Module authors can include the following
in a t
/pod
-coverage.t
78 file and have "Test
::Pod
::Coverage" automatically find and check all
79 modules
in the module distribution
:
82 eval "use Test
::Pod
::Coverage
1.00"
;
83 plan skip_all
=> "Test
::Pod
::Coverage
1.00 required
for testing POD coverage"
if $@
;
84 all_pod_coverage_ok
();
87 # This package was generated automatically with the cpan2rpm
88 # utility. To get this software or for more information
89 # please visit: http://perl.arix.com/
93 %setup -q
-n
%{pkgname}-%{version}
94 chmod
-R u
+w
%{_builddir}/%{pkgname}-%{version}
97 grep
-rsl '^
#!.*perl' . |
98 grep
-v '.bak$' |xargs
--no
-run
-if-empty \
99 %__perl -MExtUtils
::MakeMaker
-e 'MY
->fixin
(@ARGV
)'
100 CFLAGS
="$RPM_OPT_FLAGS"
101 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}|
if \$ExtUtils
::MakeMaker
::VERSION
=~
/5\
.9[1-6]|
6\
.0[0-5]/ '`
108 [ "
%{buildroot}" != "/" ] && rm -rf %{buildroot}
110 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
112 cmd
=/usr
/share
/spec
-helper
/compress_files
113 [ -x $cmd
] || cmd
=/usr
/lib
/rpm
/brp
-compress
117 if [ -e
/etc
/SuSE
-release
-o
-e
/etc
/UnitedLinux
-release
]
119 %{__mkdir_p} %{buildroot}/var
/adm
/perl
-modules
120 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
121 |
%{__sed} -e s+%{buildroot}++g \
122 > %{buildroot}/var/adm/perl-modules/%{name}
125 # remove special files
126 find
%{buildroot} -name "perllocal.pod" \
127 -o
-name ".packlist" \
131 # no empty directories
132 find
%{buildroot}%{_prefix} \
134 -exec rmdir {} \
; 2>/dev
/null
136 %{__perl} -MFile
::Find
-le '
137 find
({ wanted
=> \
&wanted
, no_chdir
=> 1}, "
%{buildroot}"
);
138 print "
%doc Changes"
;
139 for my $x
(sort @
dirs, @files
) {
140 push @ret
, $x unless indirs
($x
);
142 print join "\n"
, sort @ret
;
147 local $_
= $File
::Find
::name
;
148 my $f
= $_
; s|^\Q
%{buildroot}\E||
;
149 return unless length
;
150 return $files
[@files
] = $_
if -f $f
;
153 /\Q$d\E
/ && return for reverse sort @INC
;
154 $d
=~
/\Q$_\E
/ && return
155 for qw|
/etc
%_prefix/man
%_prefix/bin
%_prefix/share|
;
162 $x
=~
/^\Q$_\E\
// && $x ne $_
&& return 1 for @
dirs;
166 [ -z
%filelist ] && {
167 echo "ERROR
: empty
%files listing"
172 [ "
%{buildroot}" != "/" ] && rm -rf %{buildroot}
175 %defattr(-,root
,root
)
178 * Thu Nov
23 2006 root@dca02