| 1 | package | ||
| 2 | JavaScript::Duktape::C::libPath; | ||
| 3 | use File::Spec; | ||
| 4 | my $file = File::Spec->rel2abs(__FILE__); | ||
| 5 | $file =~ m/(.*?)libPath\.pm/; | ||
| 6 | our $dir = File::Spec->canonpath( $1 ); | ||
| 7 | |||
| 8 | sub getPath { | ||
| 9 | my $extra = shift; | ||
| 10 | return File::Spec->canonpath( $dir . '/' . $extra ); | ||
| 11 | } | ||
| 12 | |||
| 13 | sub getFile { | ||
| 14 | my $file = shift; | ||
| 15 | $file = File::Spec->canonpath( $dir . '/' . $file ); | ||
| 16 | } | ||
| 17 | |||
| 18 | 1; |