| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | #======================================================================== | 
| 2 |  |  |  |  |  |  | # | 
| 3 |  |  |  |  |  |  | # Badger::Codec::Storable | 
| 4 |  |  |  |  |  |  | # | 
| 5 |  |  |  |  |  |  | # DESCRIPTION | 
| 6 |  |  |  |  |  |  | #   Codec for encoding/decoding data via the Storable module. | 
| 7 |  |  |  |  |  |  | # | 
| 8 |  |  |  |  |  |  | # AUTHOR | 
| 9 |  |  |  |  |  |  | #   Andy Wardley | 
| 10 |  |  |  |  |  |  | # | 
| 11 |  |  |  |  |  |  | #======================================================================== | 
| 12 |  |  |  |  |  |  |  | 
| 13 |  |  |  |  |  |  | package Badger::Codec::Storable; | 
| 14 |  |  |  |  |  |  |  | 
| 15 |  |  |  |  |  |  | use Badger::Class | 
| 16 | 4 |  |  |  |  | 29 | version => 0.01, | 
| 17 | 4 |  |  | 4 |  | 4329 | base    => 'Badger::Codec'; | 
|  | 4 |  |  |  |  | 9 |  | 
| 18 |  |  |  |  |  |  |  | 
| 19 | 4 |  |  | 4 |  | 2447 | use Storable qw( freeze thaw ); | 
|  | 4 |  |  |  |  | 11619 |  | 
|  | 4 |  |  |  |  | 572 |  | 
| 20 |  |  |  |  |  |  |  | 
| 21 |  |  |  |  |  |  | sub encode { | 
| 22 | 12 |  |  | 12 | 1 | 45 | my $self = shift; | 
| 23 | 12 |  |  |  |  | 36 | freeze(@_); | 
| 24 |  |  |  |  |  |  | } | 
| 25 |  |  |  |  |  |  |  | 
| 26 |  |  |  |  |  |  | sub decode { | 
| 27 | 12 |  |  | 12 | 1 | 66 | my $self = shift; | 
| 28 | 12 |  |  |  |  | 39 | thaw(@_); | 
| 29 |  |  |  |  |  |  | } | 
| 30 |  |  |  |  |  |  |  | 
| 31 |  |  |  |  |  |  | # shortcuts straight to the real encoder/decoder subs for efficient aliasing | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  | sub encoder { | 
| 34 | 4 |  |  | 4 | 1 | 7 | \&freeze; | 
| 35 |  |  |  |  |  |  | } | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  | sub decoder { | 
| 38 | 4 |  |  | 4 | 1 | 7 | \&thaw; | 
| 39 |  |  |  |  |  |  | } | 
| 40 |  |  |  |  |  |  |  | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | 1; | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  | __END__ |