MailBot/UI/Manual.pm

filter: Statementstmt 11.7% 4 / 34 Branchbran 0.0% 0 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 20.0% 1 / 5 Podpod 0.0% 0 / 4 totaltotal 9.0% 5 / 55 CC 7 SCAR 35.9
CC
7
Cov
9%
vGetMessage
56.0
vInit
2.0
vQuotaMultiplier
2.0
CRAP 36.3
« blib/lib/GetWeb/Unformat.pm ↑ Summary blib/lib/GetWeb/FormatText.pm »
1 package MailBot::UI::Manual;
2  
3 26 @ISA = qw( MailBot::UI );
4 26 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 sub vInit
7 0 ▶{
Subroutine vInit: not called CC=1 SCAR=6.9
Pod undocumented
8 0 my $self = shift;
9 }
10  
11 sub vQuotaMultiplier
12 0 ▶{
Subroutine vQuotaMultiplier: not called CC=1 SCAR=6.9
Pod undocumented
13 0 0;
14 }
15  
16 sub vGetMessage
17 0 ▶{
Subroutine vGetMessage: not called CC=7 SCAR=40.3
Pod undocumented
18 0 my $self = shift;
19  
20 0 my $returnAddress = "terminal";
21  
22 0 my $config = &MailBot::Config::current;
23  
24 0 my $subject = $config -> getSubject();
25 0 ▶ if (!defined($subject))
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $subject) 0 0 0
26 {
27 0 print STDERR "Type in message subject:\n";
28 0 $subject = (<>);
29 }
30  
31 0 my $input;
32 my $paBody;
33 0 my $body = $config -> getBody();
34  
35 0 ▶ if (defined($body))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $body) { } 0 0 0
36 {
37 0 $paBody = [ $body ];
38 }
39 else
40 {
41 0 print STDERR "Type in message, with a single '.' when done.\n";
42
43 0 $paBody = [];
44 0 ▶ while ($input = (<>))
Branch: 1 branch
BranchTrueFalseTotal
if (defined($input = readline ARGV)) 0 0 0
45 {
46 0 ▶ last unless defined $input;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $input 0 0 0
47 0 ▶ last if $input eq ".\n";
Branch: 1 branch
BranchTrueFalseTotal
if $input eq ".\n" 0 0 0
48 0 push(@$paBody,$input);
49 }
50 }
51
52 0 my $message = new Mail::Internet;
53 0 $$self{INCOMING} = $message;
54  
55 0 my $head = $message -> head;
56 0 $head -> add('From','Original_Sender');
57 0 $head -> add('Subject',$subject);
58 0 $head -> add('Reply-To',$returnAddress);
59  
60 0 $message -> body($paBody);
61  
62 0 ▶ $self -> done unless defined $input;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $input 0 0 0
63 }
64  
65 sub vSendMessage
66 0 ▶{
Subroutine vSendMessage: not called CC=1 SCAR=6.9
Pod undocumented
67 0 my $self = shift;
68 0 my $internet = shift;
69  
70 #$internet -> head -> delete('X-Mailer');
71 0 $internet -> print();
72 }
« blib/lib/GetWeb/Unformat.pm ↑ Summary blib/lib/GetWeb/FormatText.pm »