GT::Mail::Encoder - MIME Encoder
open IN, 'decoded.txt' or die $!; open OUT, '>encoded.txt' or die $!; if (GT::Mail::Encoder->supported ('7bit')) { GT::Mail::Encoder->decode ( debug => 1, encoding => '7bit', in => \*IN, out => sub { print OUT $_[0] } ) or die $GT::Mail::Encoder::error; } else { die "Unsupported encoding"; } close IN; close OUT;
GT::Mail::Encoder is a MIME Encoder implemented in perl. It will try to use the C extension for encoding Base64. If the extension is not there it will do it in perl (slow!).
The new()
constructor and the supported()
class method are the only methods that
are public in the interface. The new()
constructor takes a hash of params.
The supported()
method takes a single string, the name of the encoding you want
to encode and returns true if the encoding is supported and false otherwise.
Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved. http://www.gossamer-threads.com/
Revision: $Id: Encoder.pm,v 1.40 2004/01/13 01:35:17 jagerman Exp $