File: 54taint.t

package info (click to toggle)
libdbix-class-perl 0.08010-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,052 kB
  • ctags: 1,064
  • sloc: perl: 10,536; sql: 225; makefile: 45
file content (33 lines) | stat: -rwxr-xr-x 732 bytes parent folder | download | duplicates (2)
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
#!perl -T

# the above line forces Test::Harness into taint-mode

use strict;
use warnings;

our @plan;

BEGIN {
  eval "require Module::Find;";
  @plan = $@ ? ( skip_all => 'Could not load Module::Find' )
    : ( tests => 2 );
}

package DBICTest::Schema;

# Use the default test class namespace to avoid the need for a
# new test infrastructure. If invalid classes will be introduced to
# 't/lib/DBICTest/Schema/' someday, this has to be reworked.

use lib qw(t/lib);

use Test::More @plan;

use base qw/DBIx::Class::Schema/;

eval{ __PACKAGE__->load_classes() };
cmp_ok( $@, 'eq', '',
        'Loading classes with Module::Find worked in taint mode' );
ok( __PACKAGE__->sources(), 'At least on source has been registered' );

1;