Verify/App.pm untested

filter: Statementstmt 0.0% 0 / 40 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 45 CC 2 SCAR 15.4
CC
2
Cov
0%
run
6.0
BEGIN
2.0
CRAP 4.7
1 package Net::SMTP::Verify::App;
2  
3 use Moose;
4  
5 our $VERSION = '1.04'; # VERSION
6 # ABSTRACT: commandline wrapper class for Net::SMTP::Verify
7  
8 extends 'Net::SMTP::Verify';
9 with 'MooseX::Getopt';
10  
11 has '+helo_name' => (
12 traits => [ 'Getopt' ],
13 cmd_aliases => 'n',
14 documentation => 'name to use in EHLO',
15 );
16 has '+host' => (
17 traits => [ 'Getopt' ],
18 cmd_aliases => 'H',
19 documentation => 'query this host instead of MX',
20 );
21 has '+port' => (
22 traits => [ 'Getopt' ],
23 cmd_aliases => 'p',
24 documentation => 'port to use (default 25)',
25 );
26 has '+timeout' => (
27 traits => [ 'Getopt' ],
28 cmd_aliases => 't',
29 documentation => 'smtp timeout (default 30s)',
30 );
31 has '+tlsa' => (
32 traits => [ 'Getopt' ],
33 cmd_aliases => 'a',
34 documentation => 'lookup if TLSA record is available',
35 );
36 has '+openpgpkey' => (
37 traits => [ 'Getopt' ],
38 cmd_aliases => 'o',
39 documentation => 'lookup if OPENPGPKEY records are available',
40 );
41 has '+debug' => (
42 traits => [ 'Getopt' ],
43 cmd_aliases => 'd',
44 documentation => 'print debug info to STDERR',
45 );
46 has '+rcpt_bulk_size' => (
47 traits => [ 'Getopt' ],
48 cmd_aliases => 'b',
49 documentation => 'how many RCPTs to send in one bulk when PIPELINING (default 10)',
50 );
51  
52 has 'from' => (
53 is => 'rw', isa => 'Str',
54 required => 1,
55 traits => [ 'Getopt' ],
56 cmd_aliases => 'f',
57 documentation => 'address to use in MAIL FROM',
58 );
59 has 'size' => (
60 is => 'rw', isa => 'Int',
61 traits => [ 'Getopt' ],
62 cmd_aliases => 's',
63 documentation => 'how many RCPTs to send in one bulk when PIPELINING (default 10)',
64 );
65 has 'json' => (
66 is => 'rw', isa => 'Bool',
67 traits => [ 'Getopt' ],
68 cmd_aliases => 'j',
69 documentation => 'output JSON',
70 );
71  
72 has '+resolver' => ( traits => [ 'NoGetopt' ] );
73 has '+logging_callback' => ( traits => [ 'NoGetopt' ] );
74  
75 sub run {
76 my $self = shift;
77  
78 my $rs = $self->check( $self->size, $self->from, @{$self->extra_argv} );
79  
80 if( $self->json ) {
81 $rs->dump_json;
82 } else {
83 $rs->print_text;
84 }
85  
86 return;
87 }
88  
89 1;
90  
91 __END__