File Coverage

blib/lib/Mail/Salsa/Action/Help.pm
Criterion Covered Total %
statement 15 25 60.0
branch n/a
condition 0 3 0.0
subroutine 5 7 71.4
pod 0 2 0.0
total 20 37 54.0


line stmt bran cond sub pod time code
1             #
2             # Mail/Salsa/Action/Help.pm
3             # Last Modification: Fri Jun 18 14:37:04 WEST 2004
4             #
5             # Copyright (c) 2004 Henrique Dias . All rights reserved.
6             # This module is free software; you can redistribute it and/or modify
7             # it under the same terms as Perl itself.
8             #
9             package Mail::Salsa::Action::Help;
10              
11 1     1   30071 use 5.008000;
  1         3  
  1         36  
12 1     1   4 use strict;
  1         3  
  1         30  
13 1     1   5 use warnings;
  1         1  
  1         45  
14              
15             require Exporter;
16 1     1   854 use AutoLoader qw(AUTOLOAD);
  1         1545  
  1         6  
17 1     1   536 use Mail::Salsa::Logs qw(logs);
  1         3  
  1         356  
18              
19             our @ISA = qw(Exporter);
20              
21             # Items to export into callers namespace by default. Note: do not export
22             # names by default without a very good reason. Use EXPORT_OK instead.
23             # Do not simply export all your public functions/methods/constants.
24              
25             # This allows declaration use Mail::Salsa ':all';
26             # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
27             # will save memory.
28             our %EXPORT_TAGS = ( 'all' => [ qw() ] );
29              
30             our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
31             our @EXPORT = qw();
32             our $VERSION = '0.01';
33              
34             sub new {
35 0     0 0   my $proto = shift;
36 0   0       my $class = ref($proto) || $proto;
37 0           my $self = {@_};
38 0           bless ($self, $class);
39 0           $self->process_msg();
40 0           return($self);
41             }
42              
43             sub process_msg {
44 0     0 0   my $self = shift;
45              
46 0           my ($name, $domain) = split(/\@/, $self->{'list'});
47 0           Mail::Salsa::Utils::tplsendmail(
48             smtp_server => $self->{'smtp_server'},
49             timeout => $self->{'timeout'},
50             label => "HELP_MESSAGE",
51             lang => $self->{'config'}->{'language'},
52             vars => {
53             from => "$name\-master\@$domain",
54             to => $self->{'from'},
55             name => $name,
56             domain => $domain,
57             }
58             );
59 0           return();
60             }
61              
62             # Autoload methods go after =cut, and are processed by the autosplit program.
63              
64             1;
65             __END__