File Coverage

blib/lib/Email/Abstract/EmailSimple.pm
Criterion Covered Total %
statement 24 24 100.0
branch n/a
condition n/a
subroutine 11 11 100.0
pod 0 7 0.0
total 35 42 83.3


line stmt bran cond sub pod time code
1 3     3   2144 use strict;
  3         5  
  3         124  
2 3     3   16 use warnings;
  3         5  
  3         241  
3             package Email::Abstract::EmailSimple;
4             # ABSTRACT: Email::Abstract wrapper for Email::Simple
5             $Email::Abstract::EmailSimple::VERSION = '3.008';
6 3     3   20 use Email::Abstract::Plugin;
  3         3  
  3         107  
7 3     3   725 BEGIN { @Email::Abstract::EmailSimple::ISA = 'Email::Abstract::Plugin' };
8              
9 3     3 0 9 sub target { "Email::Simple" }
10              
11             sub construct {
12 3     3 0 17 require Email::Simple;
13 3         2 my ($class, $rfc822) = @_;
14 3         9 Email::Simple->new($rfc822);
15             }
16              
17             sub get_header {
18 18     18 0 20 my ($class, $obj, $header) = @_;
19 18         40 $obj->header($header);
20             }
21              
22             sub get_body {
23 9     9 0 11 my ($class, $obj) = @_;
24 9         19 $obj->body();
25             }
26              
27             sub set_header {
28 7     7 0 14 my ($class, $obj, $header, @data) = @_;
29 7         18 $obj->header_set($header, @data);
30             }
31              
32             sub set_body {
33 7     7 0 10 my ($class, $obj, $body) = @_;
34 7         17 $obj->body_set($body);
35             }
36              
37             sub as_string {
38 10     10 0 19 my ($class, $obj) = @_;
39 10         34 $obj->as_string();
40             }
41              
42             1;
43              
44             #pod =head1 DESCRIPTION
45             #pod
46             #pod This module wraps the Email::Simple mail handling library with an
47             #pod abstract interface, to be used with L
48             #pod
49             #pod =head1 SEE ALSO
50             #pod
51             #pod L, L.
52             #pod
53             #pod =cut
54              
55             __END__