File Coverage

blib/lib/Alien/GvaScript.pm
Criterion Covered Total %
statement 12 24 50.0
branch 0 6 0.0
condition n/a
subroutine 4 7 57.1
pod 3 3 100.0
total 19 40 47.5


line stmt bran cond sub pod time code
1             package Alien::GvaScript;
2 1     1   13962 use strict;
  1         2  
  1         25  
3 1     1   4 use warnings;
  1         2  
  1         32  
4              
5 1     1   413 use File::Copy qw(copy);
  1         3388  
  1         53  
6 1     1   6 use File::Path qw(mkpath);
  1         2  
  1         210  
7              
8             our $VERSION = '1.45';
9              
10             sub path {
11 0     0 1   (my $path = __FILE__) =~ s[\.pm$][/lib];
12 0           return $path;
13             }
14              
15             sub html {
16 0     0 1   (my $html_path = __FILE__) =~ s[\.pm$][/html];
17 0           return $html_path;
18             }
19              
20             sub install {
21 0     0 1   my ($class, $destdir) = @_;
22 0 0         if (!-d $destdir) {
23 0 0         mkpath( $destdir )
24             or die "can't create '$destdir'; $!";
25             }
26              
27 0           my $path = $class->path();
28 0           my @files = grep { -f $_ } glob "$path/*";
  0            
29 0           foreach my $file (@files) {
30 0 0         copy( $file, $destdir )
31             or die "can't copy '$file' to '$destdir'; $!";
32             }
33             }
34              
35             1;
36              
37             __END__