NAME

Mail::Make::Stream - Stream Infrastructure for Mail::Make Encoders

SYNOPSIS

# Used internally by Mail::Make::Stream::Base64 and
# Mail::Make::Stream::QuotedPrint. Not normally instantiated directly.

VERSION

v0.1.0

DESCRIPTION

Mail::Make::Stream is the namespace root for stream-oriented encode/decode helpers. It also defines the inline class Mail::Make::Stream::Generic, which is the parent of all concrete stream encoders.

Its primary method is "_get_glob_from_arg", which normalises any of the following argument types into a ( $fh, $op ) pair:

  • A native Perl glob or IO object

  • A scalar reference — opened via Module::Generic::Scalar::IO

  • A plain string — treated as a file path and opened via new_file()

The returned $op closure abstracts over the underlying handle type:

  • Read mode: $op->( $buf, $len ) — bytes read (0 at EOF, undef on error)

  • Write mode: $op->( $data ) — true on success, undef on error

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Mail::Make::Stream::Base64, Mail::Make::Stream::QuotedPrint, Mail::Make

COPYRIGHT & LICENSE

Copyright(c) 2026 DEGUEST Pte. Ltd.

All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.