| 1 | package Fetch::Install::Files; | ||
| 2 | |||
| 3 | $self = { | ||
| 4 | 'deps' => [ | ||
| 5 | 'File::Raw', | ||
| 6 | 'File::Raw::JSON', | ||
| 7 | 'Tie::OrderedHash' | ||
| 8 | ], | ||
| 9 | 'inc' => '', | ||
| 10 | 'libs' => '', | ||
| 11 | 'typemaps' => [] | ||
| 12 | }; | ||
| 13 | |||
| 14 | @deps = @{ $self->{deps} }; | ||
| 15 | @typemaps = @{ $self->{typemaps} }; | ||
| 16 | $libs = $self->{libs}; | ||
| 17 | $inc = $self->{inc}; | ||
| 18 | |||
| 19 | $CORE = undef; | ||
| 20 | foreach (@INC) { | ||
| 21 | if ( -f $_ . "/Fetch/Install/Files.pm") { | ||
| 22 | $CORE = $_ . "/Fetch/Install/"; | ||
| 23 | last; | ||
| 24 | } | ||
| 25 | } | ||
| 26 | |||
| 27 | sub deps { @{ $self->{deps} }; } | ||
| 28 | |||
| 29 | sub Inline { | ||
| 30 | my ($class, $lang) = @_; | ||
| 31 | +{ map { (uc($_) => $self->{$_}) } qw(inc libs typemaps) }; | ||
| 32 | } | ||
| 33 | |||
| 34 | 1; |