AxKit-XSP-Currency
view release on metacpan or search on metacpan
# $Id: /local/CPAN/AxKit-XSP-Currency/t/strict.t 1468 2005-03-15T02:03:23.392086Z claco $
use strict;
use warnings;
use Test::More;
use File::Find;
use File::Basename;
eval 'use Test::Strict';
plan skip_all => 'Test::Strict not installed' if $@;
plan skip_all => 'Need untaint in newer File::Find' if $] <= 5.006;
## I hope this can go away if Test::Strict or File::Find::Rule
## finally run under -T. Until then, I'm on my own here. ;-)
my @files;
my %trusted = (
'apache_test_config.pm' => 1,
'modperl_inc.pl' => 1,
'modperl_startup.pl' => 1
);
find({ wanted => \&wanted,
untaint => 1,
untaint_pattern => qr|^([-+@\w./]+)$|,
untaint_skip => 1,
no_chdir => 1
}, qw(lib t));
sub wanted {
my $name = $File::Find::name;
my $file = fileparse($name);
if ($name =~ /\.(pm|pl|t)$/i && !exists($trusted{$file})) {
push @files, $name;
};
t/warnings.t view on Meta::CPAN
# $Id: /local/CPAN/AxKit-XSP-Currency/t/warnings.t 1483 2005-03-21T23:49:39.022120Z claco $
use strict;
use warnings;
use Test::More;
use File::Find;
use File::Basename;
eval 'use Test::Strict 0.05';
plan skip_all => 'Test::Strict 0.05 not installed' if $@;
plan skip_all => 'Need untaint in newer File::Find' if $] <= 5.006;
## I hope this can go away if Test::Strict or File::Find::Rule
## finally run under -T. Until then, I'm on my own here. ;-)
my @files;
my %trusted = (
'apache_test_config.pm' => 1,
'modperl_inc.pl' => 1,
'modperl_startup.pl' => 1
);
find({ wanted => \&wanted,
untaint => 1,
untaint_pattern => qr|^([-+@\w./]+)$|,
untaint_skip => 1,
no_chdir => 1
}, qw(lib t));
sub wanted {
my $name = $File::Find::name;
my $file = fileparse($name);
if ($name =~ /\.(pm|pl|t)$/i && !exists($trusted{$file})) {
push @files, $name;
};
( run in 0.393 second using v1.01-cache-2.11-cpan-4e96b696675 )