Email-ARF

 view release on metacpan or  search on metacpan

lib/Email/ARF/Report.pm  view on Meta::CPAN

use strict;
use warnings;
package Email::ARF::Report 0.012;
# ABSTRACT: interpret Abuse Reporting Format (ARF) messages

use Carp ();
use Email::MIME 1.929 (); # content-type attributes
use Email::MIME::ContentType 1.016 (); # type/subtype
use Scalar::Util ();
use Params::Util qw(_INSTANCE);

#pod =begin :prelude
#pod
#pod =head1 WARNING
#pod
#pod B<Achtung!>  This is a prototype.  This module will definitely continue to
#pod exist, but maybe the interface will change radically once more people have seen

t/errors.t  view on Meta::CPAN


{
  my $message = <<'END_MESSAGE';
MIME-Version: 1.0
Content-Type: text/plain

This is plain.
END_MESSAGE

  eval { my $report = $class->new($message); };
  like($@, qr/non-ARF content type/, "croak on wrong top-level content-type");

}

{
  my $message = <<'END_MESSAGE';
MIME-Version: 1.0
Content-Type: multipart/report; report-type="feedback-report"

This is plain.
END_MESSAGE



( run in 0.998 second using v1.01-cache-2.11-cpan-524268b4103 )