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.
Set debugging level. 1 or 0.
Sets the encoding used to encode.
Set to a file handle or IO handle.
Set to a code reference, the decoded stream will be passed in at the first argument for each chunk encoded.
Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved. http://www.gossamer-threads.com/
Revision: $Id: Encoder.pm,v 1.44 2008/10/29 23:31:51 brewt Exp $