lib/JavaScript/Duktape/C/libPath.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 5 | 7 | 71.4 |
branch | n/a | ||
condition | n/a | ||
subroutine | 2 | 3 | 66.6 |
pod | 0 | 2 | 0.0 |
total | 7 | 12 | 58.3 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package | ||||||
2 | JavaScript::Duktape::C::libPath; | ||||||
3 | 53 | 53 | 375 | use File::Spec; | |||
53 | 125 | ||||||
53 | 8721 | ||||||
4 | my $file = File::Spec->rel2abs(__FILE__); | ||||||
5 | $file =~ m/(.*?)libPath\.pm/; | ||||||
6 | our $dir = File::Spec->canonpath( $1 ); | ||||||
7 | |||||||
8 | sub getPath { | ||||||
9 | 318 | 318 | 0 | 863 | my $extra = shift; | ||
10 | 318 | 6388 | return File::Spec->canonpath( $dir . '/' . $extra ); | ||||
11 | } | ||||||
12 | |||||||
13 | sub getFile { | ||||||
14 | 0 | 0 | 0 | my $file = shift; | |||
15 | 0 | $file = File::Spec->canonpath( $dir . '/' . $file ); | |||||
16 | } | ||||||
17 | |||||||
18 | 1; |