From: Nick Ing-Simmons Date: Mon, 26 Mar 2001 21:59:30 +0000 (+0000) Subject: Integrate mainline. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=423473382362f0c78b47eff19336aafe6728495e;p=p5sagit%2Fp5-mst-13.2.git Integrate mainline. p4raw-id: //depot/perlio@9369 --- 423473382362f0c78b47eff19336aafe6728495e diff --cc ext/MIME/Base64/QuotedPrint.pm index ccdee2b,ccdee2b..069f322 --- a/ext/MIME/Base64/QuotedPrint.pm +++ b/ext/MIME/Base64/QuotedPrint.pm @@@ -112,4 -112,4 +112,38 @@@ sub decode_qp ($ *encode = \&encode_qp; *decode = \&decode_qp; ++# Methods for use as a PerlIO layer object ++ ++sub PUSHED ++{ ++ my ($class,$mode) = @_; ++ # When writing we buffer the data ++ my $write = ''; ++ return bless \$write,$class; ++} ++ ++sub FILL ++{ ++ my ($obj,$fh) = @_; ++ my $line = <$fh>; ++ return (defined $line) ? decode_qp($line) : undef; ++ return undef; ++} ++ ++sub WRITE ++{ ++ my ($obj,$buf,$fh) = @_; ++ $$obj .= encode_qp($buf); ++ return length($buf); ++} ++ ++sub FLUSH ++{ ++ my ($obj,$fh) = @_; ++ print $fh $$obj or return -1; ++ $$obj = ''; ++ return 0; ++} ++ ++ 1;