The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

URI::mid - RFC 2392 mid: URI implementation

VERSION

Version 0.03

SYNOPSIS

    use URI;

    my $mid = URI->new('mid:');
    $mid->mid('1bb1a82c-eb3f-415d-b82f-7fa4c63d2e31@foobar.local');

    # or, pull it (them) straight from the header:

    my @mids = URI::mid->parse($email->header('References'));

    # and put it back

    $email->header(References => join(' ', map { $_->format } @mids));

METHODS

mid

Get or set the literal Message-ID.

mid_uri

Get just the Message-ID component as a URI::mid object. Returns itself if there is no Content-ID.

cid

Get or set the Content-ID as a URI::cid object. Accepts a string or a URI::cid object. Which means you can do stuff like this:

    $mimepart->header('Content-ID' => $mid->cid->format);

parse

Parse (i.e., remove the confining angle-brackets from) one or more Message-ID headers. Returns them all in list context, or the first one in scalar context, like so:

    my $mid  = URI::mid->parse($email->header('Message-ID'));

    my @mids = URI::mid->parse($email->header('References'));

    # Also works as an instance method:

    my $mid = URI->new('mid:');
    $mid->parse($email->header('In-Reply-To'));

SEE ALSO

URI::cid
http://tools.ietf.org/html/rfc2392
Email::Simple
Email::MIME

AUTHOR

Dorian Taylor, <dorian at cpan.org>

BUGS

Please report any bugs or feature requests to bug-uri-mid at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=URI-mid. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc URI::mid

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright 2012 Dorian Taylor.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    L<http://www.apache.org/licenses/LICENSE-2.0>

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.