| 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 | 56 | 56 | 322 | use File::Spec; | |||
| 56 | 82 | ||||||
| 56 | 6955 | ||||||
| 4 | my $file = File::Spec->rel2abs(__FILE__); | ||||||
| 5 | $file =~ m/(.*?)libPath\.pm/; | ||||||
| 6 | our $dir = File::Spec->canonpath( $1 ); | ||||||
| 7 | |||||||
| 8 | sub getPath { | ||||||
| 9 | 336 | 336 | 0 | 504 | my $extra = shift; | ||
| 10 | 336 | 4481 | 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; |