File Coverage

blib/lib/SVN/Hook/Script.pm
Criterion Covered Total %
statement 6 12 50.0
branch n/a
condition 0 3 0.0
subroutine 2 3 66.6
pod 0 1 0.0
total 8 19 42.1


line stmt bran cond sub pod time code
1             package SVN::Hook::Script;
2              
3 1     1   4 use base 'Class::Accessor::Fast';
  1         2  
  1         62  
4             __PACKAGE__->mk_accessors(qw(hook enabled path));
5              
6 1     1   688 use Path::Class;
  1         59495  
  1         166  
7              
8             # returns an array of SVN::Hook::Script objects
9             sub load_from_dir {
10 0     0 0   my $class = shift;
11 0           my $dir = shift;
12 0           my $hook = shift;
13              
14 0   0       return map {
15 0           SVN::Hook::Script->new(
16             { hook => $hook,
17             path => Path::Class::File->new($_),
18             enabled => (!m/-$/ && -x $_ )
19             })
20 0           } grep { -f $_ } glob( "$dir/*" );
21             }
22              
23             1;