URI::mid - RFC 2392 mid: URI implementation
Version 0.03
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));
Get or set the literal Message-ID.
Message-ID
Get just the Message-ID component as a URI::mid object. Returns itself if there is no Content-ID.
Content-ID
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 (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'));
Dorian Taylor, <dorian at cpan.org>
<dorian at cpan.org>
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.
bug-uri-mid at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc URI::mid
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=URI-mid
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/URI-mid
CPAN Ratings
http://cpanratings.perl.org/d/URI-mid
Search CPAN
http://search.cpan.org/dist/URI-mid/
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.
To install URI::mid, copy and paste the appropriate command in to your terminal.
cpanm
cpanm URI::mid
CPAN shell
perl -MCPAN -e shell install URI::mid
For more information on module installation, please visit the detailed CPAN module installation guide.