File Coverage

blib/lib/Alien/Role/Dino.pm
Criterion Covered Total %
statement 27 27 100.0
branch 1 2 50.0
condition 1 3 33.3
subroutine 7 7 100.0
pod 2 2 100.0
total 38 41 92.6


line stmt bran cond sub pod time code
1             package Alien::Role::Dino;
2              
3 3     3   313180 use strict;
  3         14  
  3         83  
4 3     3   35 use warnings;
  3         6  
  3         79  
5 3     3   57 use 5.008001;
  3         11  
6 3     3   769 use Role::Tiny;
  3         7253  
  3         21  
7 3     3   880 use Role::Tiny::With ();
  3         496  
  3         573  
8              
9             # ABSTRACT: Experimental support for dynamic share Alien install
10             our $VERSION = '0.06'; # VERSION
11              
12              
13             sub rpath
14             {
15 8     8 1 3333 my($self, @other) = @_;
16            
17 8         33 my @dir;
18            
19 8         35 foreach my $alien ($self, @other)
20             {
21 8 50 33     139 if($alien->can('runtime_prop') && defined $alien->runtime_prop->{rpath})
22             {
23 8         137 require Path::Tiny;
24 8         29 foreach my $rpath (map { Path::Tiny->new($_)->absolute($alien->dist_dir)->stringify } @{ $alien->runtime_prop->{rpath} })
  8         102  
  8         41  
25             {
26 8         2310 push @dir, $rpath;
27             }
28             }
29             }
30            
31 8         52 @dir;
32             }
33              
34              
35             sub xs_load
36             {
37 2     2 1 90768 my($self, $package, $version, @rest) = @_;
38 2         38 require XSLoader;
39 2         1402 XSLoader::load($package, $version);
40             }
41              
42             around import => sub {
43             return;
44             };
45              
46             Role::Tiny::With::with("Alien::Role::Dino::$^O");
47              
48             1;
49              
50             __END__