Courriel::Header - A single header's name and value
version 0.46
my $subject = $headers->get('subject'); print $subject->value;
This class represents a single header, which consists of a name and value.
This class supports the following methods:
This method requires two attributes, name and value. Both must be strings. The name cannot be empty, but the value can.
name
value
The header name as passed to the constructor.
The header value as passed to the constructor.
Returns the header name and value with any necessary MIME encoding and folding.
The charset parameter specifies what character set to use for MIME-encoding non-ASCII values. This defaults to "utf8". The charset name must be one recognized by the Encode module.
charset
This method will send the stringified header to the specified output. The output can be a subroutine reference, a filehandle, or an object with a print() method. The output may be sent as a single string, as a list of strings, or via multiple calls to the output.
print()
See the as_string() method for documentation on the charset parameter.
as_string()
This class does the Courriel::Role::Streams role.
Courriel::Role::Streams
Bugs may be submitted at http://rt.cpan.org/Public/Dist/Display.html?Name=Courriel or via email to bug-courriel@rt.cpan.org.
I am also usually active on IRC as 'autarch' on irc://irc.perl.org.
irc://irc.perl.org
The source code repository for Courriel can be found at https://github.com/houseabsolute/Courriel.
Dave Rolsky <autarch@urth.org>
This software is Copyright (c) 2018 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
The full text of the license can be found in the LICENSE file included with this distribution.
To install Courriel, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Courriel
CPAN shell
perl -MCPAN -e shell install Courriel
For more information on module installation, please visit the detailed CPAN module installation guide.