| 1 | #======================================================================== | ||
| 2 | # | ||
| 3 | # Badger::Codec::Base64 | ||
| 4 | # | ||
| 5 | # DESCRIPTION | ||
| 6 | # Codec module for encoding/decoding Base64 | ||
| 7 | # | ||
| 8 | # AUTHOR | ||
| 9 | # Andy Wardley <abw@wardley.org> | ||
| 10 | # | ||
| 11 | #======================================================================== | ||
| 12 | |||
| 13 | package Badger::Codec::Base64; | ||
| 14 | |||
| 15 | use Badger::Class | ||
| 16 | 4 | ▶ | version => 0.01, |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | 4 | base => 'Badger::Codec'; | |
| 18 | |||
| 19 | 4 | ▶ | use MIME::Base64; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | 9 | ▶ | sub encode { |
|
Subroutine
encode: called CC=1 SCAR=0.0
Pod
documented
| |||
| 22 | 9 | my $self = shift; | |
| 23 | 9 | encode_base64(shift); | |
| 24 | } | ||
| 25 | |||
| 26 | 9 | ▶ | sub decode { |
|
Subroutine
decode: called CC=1 SCAR=0.0
Pod
documented
| |||
| 27 | 9 | my $self = shift; | |
| 28 | 9 | decode_base64(shift); | |
| 29 | } | ||
| 30 | |||
| 31 | # shortcuts straight to the real encoder/decoder subs for efficient aliasing | ||
| 32 | |||
| 33 | 6 | ▶ | sub encoder { |
|
Subroutine
encoder: called CC=1 SCAR=0.0
Pod
documented
| |||
| 34 | 6 | \&encode_base64; | |
| 35 | } | ||
| 36 | |||
| 37 | 6 | ▶ | sub decoder { |
|
Subroutine
decoder: called CC=1 SCAR=0.0
Pod
documented
| |||
| 38 | 6 | \&decode_base64; | |
| 39 | } | ||
| 40 | |||
| 41 | |||
| 42 | 4 | 1; | |
| 43 | |||
| 44 | |||
| 45 | __END__ | ||