13 |
is => 'rw', |
is => 'rw', |
14 |
isa => 'Str', |
isa => 'Str', |
15 |
required => 1, |
required => 1, |
16 |
default => 'Frey::Skeleton', |
default => 'App::Skeleton', |
17 |
); |
); |
18 |
|
|
19 |
has svk_add => ( |
has svk_add => ( |
33 |
$class_path =~ s{::}{/}g; |
$class_path =~ s{::}{/}g; |
34 |
$class_path = "lib/$class_path.pm"; |
$class_path = "lib/$class_path.pm"; |
35 |
|
|
36 |
my $test_path = $class; |
my $test_path; |
37 |
$test_path =~ s{::}{-}g; |
|
38 |
$test_path = "t/30-$test_path.t"; |
my @c = split(m{::}, $class); |
39 |
|
foreach ( -1 .. $#c ) { |
40 |
|
my $to = $#c - $_; |
41 |
|
my $path = 't/' . join('/', @c[ 0 .. $to ] ); |
42 |
|
if ( -e $path ) { |
43 |
|
my $file = join('-', @c[ $to + 1 .. $#c ] ); |
44 |
|
$test_path = $path . '/' . $file . '.t'; |
45 |
|
last; |
46 |
|
} |
47 |
|
} |
48 |
|
|
49 |
|
die "no test_path from $class" unless $test_path; |
50 |
|
|
51 |
die qq|class "$class" exists as |, $self->path_size($class_path) if -e $class_path; |
die qq|class "$class" exists as |, $self->path_size($class_path) if -e $class_path; |
52 |
die qq|class "$class" test exists as |, $self->path_size($test_path) if -e $test_path; |
die qq|class "$class" test exists as |, $self->path_size($test_path) if -e $test_path; |