line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gmail::IMAP::Label; |
2
|
|
|
|
|
|
|
# ABSTRACT: IMAP proxy for Google's Gmail that retrieves message labels |
3
|
|
|
|
|
|
|
$Net::Gmail::IMAP::Label::VERSION = '0.008'; |
4
|
2
|
|
|
2
|
|
132194
|
use strict; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
42
|
|
5
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
39
|
|
6
|
2
|
|
|
2
|
|
748
|
use Net::Gmail::IMAP::Label::Proxy; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
57
|
|
7
|
2
|
|
|
2
|
|
830
|
use Getopt::Long::Descriptive; |
|
2
|
|
|
|
|
64462
|
|
|
2
|
|
|
|
|
13
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub import { |
10
|
2
|
|
|
2
|
|
25
|
my ($class, @opts) = @_; |
11
|
2
|
50
|
33
|
|
|
26
|
return unless (@opts == 1 && $opts[0] eq 'run'); |
12
|
0
|
|
|
|
|
0
|
$class->run; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub run { |
16
|
1
|
|
|
1
|
0
|
1432
|
my ($opts, $usage) = describe_options( |
17
|
|
|
|
|
|
|
"$0 %o", |
18
|
1
|
|
|
|
|
12
|
[ 'port|p=i', "local port to connect to (default: @{[Net::Gmail::IMAP::Label::Proxy::DEFAULT_LOCALPORT]})", { default => Net::Gmail::IMAP::Label::Proxy::DEFAULT_LOCALPORT } ], |
19
|
|
|
|
|
|
|
[ 'verbose|v+', "increase verbosity (multiple flags for more verbosity)" , { default => 0 } ], |
20
|
|
|
|
|
|
|
[ 'help|h|?', "print usage message and exit" ], |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
1
|
50
|
|
|
|
1100
|
if($opts->help) { |
24
|
1
|
|
|
|
|
8
|
print($usage->text); |
25
|
1
|
|
|
|
|
417
|
return 1; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
Net::Gmail::IMAP::Label::Proxy->new(localport => $opts->port, verbose => $opts->verbose)->run(); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# vim:ts=4:sw=4 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |