source:
trunk/essentials/dev-lang/perl/lib/Memoize/t/tie_storable.t
| Last change on this file was 3181, checked in by , 19 years ago | |
|---|---|
| File size: 1.5 KB | |
| Line | |
|---|---|
| 1 | #!/usr/bin/perl |
| 2 | # -*- mode: perl; perl-indent-level: 2 -*- |
| 3 | |
| 4 | use lib qw(. ..); |
| 5 | use Memoize 0.45 qw(memoize unmemoize); |
| 6 | # $Memoize::Storable::Verbose = 0; |
| 7 | |
| 8 | eval {require Memoize::Storable}; |
| 9 | if ($@) { |
| 10 | print "1..0\n"; |
| 11 | exit 0; |
| 12 | } |
| 13 | |
| 14 | sub i { |
| 15 | $_[0]; |
| 16 | } |
| 17 | |
| 18 | sub c119 { 119 } |
| 19 | sub c7 { 7 } |
| 20 | sub c43 { 43 } |
| 21 | sub c23 { 23 } |
| 22 | sub c5 { 5 } |
| 23 | |
| 24 | sub n { |
| 25 | $_[0]+1; |
| 26 | } |
| 27 | |
| 28 | eval {require Storable}; |
| 29 | if ($@) { |
| 30 | print "1..0\n"; |
| 31 | exit 0; |
| 32 | } |
| 33 | |
| 34 | print "1..4\n"; |
| 35 | |
| 36 | |
