| 1 |
root |
1.1 |
#! perl |
| 2 |
|
|
#line "staticperl-boot" |
| 3 |
|
|
|
| 4 |
|
|
# boot file for staticperl |
| 5 |
|
|
# this file will be eval'ed at initialisation time |
| 6 |
|
|
|
| 7 |
|
|
package staticperl; |
| 8 |
|
|
|
| 9 |
|
|
BEGIN { |
| 10 |
|
|
PerlIO::scalar->bootstrap; # needed for scalar=>fh conversion |
| 11 |
|
|
Compress::LZF->bootstrap; # needed for decompression... |
| 12 |
|
|
|
| 13 |
|
|
@INC = sub { |
| 14 |
|
|
# find |
| 15 |
|
|
if (my $data = find_file "/$_[1]") { |
| 16 |
|
|
# decompress |
| 17 |
|
|
$data = Compress::LZF::decompress ($data); |
| 18 |
|
|
# create a filehandle |
| 19 |
|
|
open my $fh, "<", \$data; |
| 20 |
|
|
# return |
| 21 |
|
|
return $fh; |
| 22 |
|
|
} |
| 23 |
|
|
|
| 24 |
|
|
undef |
| 25 |
|
|
}; |
| 26 |
|
|
} |
| 27 |
|
|
|