| 1 | package Acme::CramCode; | ||
| 2 | 1 | ▶ | use Compress::Zlib; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | our $VERSION = '0.01'; | ||
| 4 | $birthmark ="Oh, I'm crammed, baby!!"; | ||
| 5 | 0 | ▶ | sub encode($){$birthmark. compress shift} |
|
Subroutine
encode: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 6 | 1 | ▶ | sub decode($){uncompress shift} |
|
Subroutine
decode: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 7 | 1 | ▶ | sub bm($){$_[0]=~/^$birthmark/s} |
|
Subroutine
bm: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 8 | open 0 or print "Can't open '$0'\n" and exit; | ||
| 9 | (my $code=join q//, <0>)=~s/.*^\s*use\s+Acme::CramCode\s*;\n//sm; | ||
| 10 | 1 | ▶ | do {$code=~s/^$birthmark//;eval decode $code; exit} if bm $code; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | open 0, ">$0" or print "Cannot encode '$0'\n" and exit; | ||
| 12 | print {0} "use Acme::CramCode;\n", encode $code and exit; | ||
| 13 | 1; | ||
| 14 | __END__ | ||