summaryrefslogtreecommitdiff
path: root/cpan/MIME-Base64/Base64.pm
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/MIME-Base64/Base64.pm')
-rw-r--r--cpan/MIME-Base64/Base64.pm27
1 files changed, 24 insertions, 3 deletions
diff --git a/cpan/MIME-Base64/Base64.pm b/cpan/MIME-Base64/Base64.pm
index 2bcd585779..758beccf24 100644
--- a/cpan/MIME-Base64/Base64.pm
+++ b/cpan/MIME-Base64/Base64.pm
@@ -1,13 +1,14 @@
package MIME::Base64;
use strict;
-use vars qw(@ISA @EXPORT $VERSION);
+use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(encode_base64 decode_base64);
+@EXPORT_OK = qw(encoded_base64_length decoded_base64_length);
-$VERSION = '3.09';
+$VERSION = '3.10';
require XSLoader;
XSLoader::load('MIME::Base64', $VERSION);
@@ -39,7 +40,7 @@ arbitrary sequences of octets in a form that need not be humanly
readable. A 65-character subset ([A-Za-z0-9+/=]) of US-ASCII is used,
enabling 6 bits to be represented per printable character.
-The following functions are provided:
+The following primary functions are provided:
=over 4
@@ -78,6 +79,26 @@ call them as:
$encoded = MIME::Base64::encode($decoded);
$decoded = MIME::Base64::decode($encoded);
+Additional functions not exported by default:
+
+=over 4
+
+=item encoded_base64_length($str)
+
+=item encoded_base64_length($str, $eol)
+
+Returns the length that the encoded string would have without actually
+encoding it. This will return the same value as C<< length(encode_base64($str)) >>,
+but should be more efficient.
+
+=item decoded_base64_length($str)
+
+Returns the length that the decoded string would have without actually
+decoding it. This will return the same value as C<< length(decode_base64($str)) >>,
+but should be more efficient.
+
+=back
+
=head1 DIAGNOSTICS
The following warnings can be generated if perl is invoked with the