Skip to content

Instantly share code, notes, and snippets.

@abh
Created August 3, 2009 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abh/160379 to your computer and use it in GitHub Desktop.
Save abh/160379 to your computer and use it in GitHub Desktop.
package CPAN::Testers::API::ReportNNTP;
use Moose;
use Email::Simple;
use IO::Uncompress::AnyInflate qw(anyinflate $AnyInflateError);
has zarticle => (
isa => 'Str',
is => 'ro',
required => 1,
);
sub article {
my $self = shift;
my $zarticle = $self->zarticle;
anyinflate \$zarticle => \(my $article)
or die "anyinflate failed: $AnyInflateError\n";
return $article;
}
sub email {
my $self = shift;
my $email = Email::Simple->new($self->article);
return $email;
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment