File Coverage

blib/lib/Mail/Builder/Simple/Scalar.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 2 2 100.0
total 23 23 100.0


line stmt bran cond sub pod time code
1             package Mail::Builder::Simple::Scalar;
2              
3 1     1   990 use strict;
  1         2  
  1         43  
4 1     1   5 use warnings;
  1         2  
  1         32  
5 1     1   985 use Exception::Died;
  1         17526  
  1         8  
6              
7 1     1   59 use 5.008_008;
  1         5  
  1         125  
8              
9             our $VERSION = '0.03';
10              
11             sub new {
12 1     1 1 946 return bless {}, shift;
13             }
14              
15             sub process {
16 1     1 1 1133 my ( $self, $content ) = @_;
17 1         19 return $content;
18             }
19              
20             1;
21              
22             __END__
23              
24             =head1 NAME
25              
26             Mail::Builder::Simple::Scalar - Plugin for Mail::Builder::Simple
27              
28             =head1 VERSION
29              
30             Version 0.03
31              
32             =head1 SYNOPSIS
33              
34             my $template = Mail::Builder::Simple::Scalar->new;
35             $template->process($template);
36              
37             =head1 DESCRIPTION
38              
39             This module shouldn't be used directly, but as a plugin of L<Mail::Builder::Simple|Mail::Builder::Simple> for sending email messages with the body or the attachments created from a scalar variable.
40              
41             This plugin module is usually used only for creating the attachments from a scalar variable, because the text and the HTML part of the email messages can be created directly without it.
42              
43             =head1 SUBROUTINES/METHODS
44              
45             =head2 new
46              
47             C<new()> is the class constructor. It doesn't require any parameter.
48              
49             =head2 process
50              
51             C<process()> is the method that process the template.
52              
53             It accepts a scalar value as a parameter which contains the body of the template.
54              
55             =head1 SEE ALSO
56              
57             L<Mail::Builder::Simple|Mail::Builder::Simple>
58              
59             =head1 DIAGNOSTICS
60              
61             =head1 CONFIGURATION AND ENVIRONMENT
62              
63             This module doesn't require any configuration.
64              
65             =head1 DEPENDENCIES
66              
67             L<Exception::Died|Exception::Died>
68              
69             =head1 INCOMPATIBILITIES
70              
71             No known incompatibilities.
72              
73             =head1 BUGS AND LIMITATIONS
74              
75             Not known bugs. If you find some, please announce.
76              
77             =head1 AUTHOR
78              
79             Octavian Rasnita <orasnita@gmail.com>
80              
81             =head1 LICENSE AND COPYRIGHT
82              
83             This program is free software; you can redistribute it and/or modify it under
84             the same terms as Perl itself.
85              
86             =cut