File: podok

package info (click to toggle)
libnet-amazon-perl 0.62-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,400 kB
  • ctags: 2,271
  • sloc: xml: 20,530; perl: 19,997; makefile: 9
file content (37 lines) | stat: -rwxr-xr-x 663 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/perl
###########################################
# Mike Schilli, 2002 (m@perlmeister.com)
###########################################
use warnings;
use strict;

use Test::Pod;
use Test::More;
use File::Find;

podok(@ARGV);
0;

##################################################
sub podok {
##################################################
    my ($dir) = @_;

    $dir ||= ".";

    my @pms = ();

    File::Find::find( sub {
        return unless -f $_;
        return unless /\.pm$/;
        push @pms, "$File::Find::name";
    }, $dir);

    my $nof_tests = scalar @pms;

    plan tests => $nof_tests;

    for(@pms) {
        pod_ok($_);
    }
}