NAME

Mail::Alias::Reader::Token

DESCRIPTION

Mail::Alias::Reader::Token is not only the class represents an aliases(5) parser token, but also itself is returned by Mail::Alias::Reader as a representation of a mail alias destination. For the purposes of this documentation, only the public-facing methods which facilitate the usage of instances of this class shall be discussed.

DETERMINING MAIL DESTINATION TYPE

A variety of methods are provided to allow one to infer the type of a mail alias (parser token) returned.

$destination->is_address()

Returns true if the mail destination described by the current token is a local part or fully qualified mail address.

$destination->is_directive()

Returns true if the mail destination described by the current token is a mail transfer agent directive.

$destination->is_command()

Returns true if the mail destination described by the current token is a command to which mail messages should be piped.

$destination->is_file()

Returns true if the mail destination described by the current token is a file to which mail messages should be appended.

CONVERTING THE MAIL DESTINATION TO A STRING

$destination->value()

Returns a parsed and unescaped logical representation of the mail alias destination that was originally parsed to yield the current token object.

$destination->to_string()

Returns a string representation of the mail alias destination that was originally parsed to yield the current token object.

AUTHOR

Erin Schoenhals <erin@cpanel.net>

COPYRIGHT

Copyright (c) 2012, cPanel, Inc. All rights reserved. http://cpanel.net/

This is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See the LICENSE file for further details.