~ubuntu-branches/ubuntu/maverick/libmodule-starter-plugin-cgiapp-perl/maverick

« back to all changes in this revision

Viewing changes to lib/Module/Starter/Plugin/CGIApp/templates/titanium/perl-critic.t

  • Committer: Bazaar Package Importer
  • Author(s): Jaldhar H. Vyas
  • Date: 2008-09-18 22:36:44 UTC
  • Revision ID: james.westby@ubuntu.com-20080918223644-ali0eh6eno0tw5ta
Tags: upstream-0.05
ImportĀ upstreamĀ versionĀ 0.05

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!perl -T
 
2
#
 
3
# $Id$
 
4
#
 
5
use strict;
 
6
use warnings;
 
7
use English qw( -no_match_vars );
 
8
use File::Find qw();
 
9
use Test::More;
 
10
 
 
11
if ( !$ENV{TEST_AUTHOR} ) {
 
12
    my $msg = 'Author test.  Set $ENV{TEST_AUTHOR} to a true value to run.';
 
13
    plan skip_all => $msg;
 
14
}
 
15
 
 
16
eval " use Test::Perl::Critic (-profile => 't/perlcriticrc'); ";
 
17
if ($EVAL_ERROR) {
 
18
    my $msg = 'Test::Perl::Critic required to criticise code';
 
19
    plan skip_all => $msg;
 
20
}
 
21
 
 
22
my @files;
 
23
 
 
24
File::Find::find(
 
25
    {   untaint => 1,
 
26
        wanted  => sub {
 
27
            /^.*\.pm\z/msx
 
28
                && $File::Find::dir !~ /templates/mx
 
29
                && push @files, $File::Find::name;
 
30
            }
 
31
    },
 
32
    'blib/'
 
33
);
 
34
 
 
35
plan tests => scalar @files;
 
36
 
 
37
foreach (@files) {
 
38
    critic_ok($_);
 
39
}