summaryrefslogtreecommitdiff
path: root/ext/MIME
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2005-11-27 02:35:25 +0000
committerSteve Peters <steve@fisharerojo.org>2005-11-27 02:35:25 +0000
commite18397069e4f2f822ced675c3133e2b7f182bb58 (patch)
tree3f0981ee8c64b8c6d3e0796b0539634d9d4eef00 /ext/MIME
parent439787adcd53f9bf3c626f16cfde7d00fa72ed23 (diff)
downloadperl-e18397069e4f2f822ced675c3133e2b7f182bb58.tar.gz
Upgrade to MIME-Base64-3.06
p4raw-id: //depot/perl@26214
Diffstat (limited to 'ext/MIME')
-rw-r--r--ext/MIME/Base64/Base64.pm35
-rw-r--r--ext/MIME/Base64/Base64.xs2
-rw-r--r--ext/MIME/Base64/Changes15
-rw-r--r--ext/MIME/Base64/Makefile.PL5
-rw-r--r--ext/MIME/Base64/QuotedPrint.pm11
5 files changed, 55 insertions, 13 deletions
diff --git a/ext/MIME/Base64/Base64.pm b/ext/MIME/Base64/Base64.pm
index f79501526c..5204e83995 100644
--- a/ext/MIME/Base64/Base64.pm
+++ b/ext/MIME/Base64/Base64.pm
@@ -1,18 +1,18 @@
package MIME::Base64;
-# $Id: Base64.pm,v 3.5 2004/09/20 09:23:23 gisle Exp $
+# $Id: Base64.pm,v 3.9 2005/11/26 10:47:48 gisle Exp $
use strict;
use vars qw(@ISA @EXPORT $VERSION);
require Exporter;
-require DynaLoader;
-@ISA = qw(Exporter DynaLoader);
+@ISA = qw(Exporter);
@EXPORT = qw(encode_base64 decode_base64);
-$VERSION = '3.05';
+$VERSION = '3.06';
-MIME::Base64->bootstrap($VERSION);
+require XSLoader;
+XSLoader::load('MIME::Base64', $VERSION);
*encode = \&encode_base64;
*decode = \&decode_base64;
@@ -101,6 +101,19 @@ in a base64 quartet.
=back
+The following exception can be raised:
+
+=over 4
+
+=item Wide character in subroutine entry
+
+The string passed to encode_base64() contains characters with code
+above 255. The base64 encoding is only defined for single-byte
+characters. Use the Encode module to select the byte encoding you
+want.
+
+=back
+
=head1 EXAMPLES
If you want to encode a large file, you should encode it in chunks
@@ -130,6 +143,18 @@ of four base64 chars:
perl -MMIME::Base64 -ne 'print decode_base64($_)' <file
+Perl v5.8 and better allow extended Unicode characters in strings.
+Such strings cannot be encoded directly, as the base64
+encoding is only defined for single-byte characters. The solution is
+to use the Encode module to select the byte encoding you want. For
+example:
+
+ use MIME::Base64 qw(encode_base64);
+ use Encode qw(encode);
+
+ $encoded = encode_base64(encode("UTF-8", "\x{FFFF}\n"));
+ print $encoded;
+
=head1 COPYRIGHT
Copyright 1995-1999, 2001-2004 Gisle Aas.
diff --git a/ext/MIME/Base64/Base64.xs b/ext/MIME/Base64/Base64.xs
index 99ff0e49a1..795f9017d5 100644
--- a/ext/MIME/Base64/Base64.xs
+++ b/ext/MIME/Base64/Base64.xs
@@ -1,4 +1,4 @@
-/* $Id: Base64.xs,v 3.4 2004/08/24 16:29:35 gisle Exp $
+/* $Id: Base64.xs,v 3.5 2005/11/26 10:44:14 gisle Exp $
Copyright 1997-2004 Gisle Aas
diff --git a/ext/MIME/Base64/Changes b/ext/MIME/Base64/Changes
index 1a132586ce..e6a25c1b8c 100644
--- a/ext/MIME/Base64/Changes
+++ b/ext/MIME/Base64/Changes
@@ -1,3 +1,18 @@
+2005-11-26 Gisle Aas <gisle@ActiveState.com>
+
+ Release 3.06
+
+ Documentation tweaks.
+
+ use XSLoader; perl-5.6 now required.
+
+ Some consting from bleadperl.
+
+ Unbundled the {en,de}code-{base64,qp} utility scripts.
+ These are now found in the MIME-Base64-Scripts package.
+
+
+
2004-09-20 Gisle Aas <gisle@ActiveState.com>
Release 3.05
diff --git a/ext/MIME/Base64/Makefile.PL b/ext/MIME/Base64/Makefile.PL
index 7a4e13ec75..d7e0784161 100644
--- a/ext/MIME/Base64/Makefile.PL
+++ b/ext/MIME/Base64/Makefile.PL
@@ -1,9 +1,10 @@
-require 5.005;
+require 5.006;
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'MIME::Base64',
- MAN3PODS => {}, # Pods will be built by installman.
VERSION_FROM => 'Base64.pm',
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ ($] >= 5.008) ?
+ (INSTALLDIRS => 'perl') : (),
);
diff --git a/ext/MIME/Base64/QuotedPrint.pm b/ext/MIME/Base64/QuotedPrint.pm
index c58ae8f909..2786be6468 100644
--- a/ext/MIME/Base64/QuotedPrint.pm
+++ b/ext/MIME/Base64/QuotedPrint.pm
@@ -1,6 +1,6 @@
package MIME::QuotedPrint;
-# $Id: QuotedPrint.pm,v 3.4 2004/08/25 09:33:45 gisle Exp $
+# $Id: QuotedPrint.pm,v 3.6 2005/11/26 10:47:48 gisle Exp $
use strict;
use vars qw(@ISA @EXPORT $VERSION);
@@ -9,7 +9,7 @@ require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(encode_qp decode_qp);
-$VERSION = "3.03";
+$VERSION = "3.06";
use MIME::Base64; # will load XS version of {en,de}code_qp()
@@ -90,10 +90,11 @@ call them as:
$encoded = MIME::QuotedPrint::encode($decoded);
$decoded = MIME::QuotedPrint::decode($encoded);
-Perl v5.6 and better allow extended Unicode characters in strings.
+Perl v5.8 and better allow extended Unicode characters in strings.
Such strings cannot be encoded directly, as the quoted-printable
-encoding is only defined for single-byte characters. The solution is to use the Encode
-module to select the byte encoding you want. For example:
+encoding is only defined for single-byte characters. The solution is
+to use the Encode module to select the byte encoding you want. For
+example:
use MIME::QuotedPrint qw(encode_qp);
use Encode qw(encode);