line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WordPress::CLIDeprecated; |
2
|
2
|
|
|
2
|
|
882
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
402
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub _abs_wppost { |
6
|
0
|
0
|
0
|
0
|
|
|
defined $ENV{HOME} or warn("cant seek .wppost, ENV HOME not set") and return; |
7
|
0
|
|
|
|
|
|
my $abs = "$ENV{HOME}/.wppost"; |
8
|
0
|
0
|
|
|
|
|
-f $abs or return; |
9
|
0
|
|
|
|
|
|
return $abs; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _conf { |
13
|
0
|
|
|
0
|
|
|
my $abs = shift; |
14
|
0
|
0
|
0
|
|
|
|
$abs ||= _abs_wppost or return; |
15
|
0
|
|
|
|
|
|
require YAML; |
16
|
0
|
|
|
|
|
|
my $conf = YAML::LoadFile($abs); |
17
|
0
|
|
|
|
|
|
$conf->{username} = $conf->{U}; |
18
|
0
|
|
|
|
|
|
$conf->{password} = $conf->{P}; |
19
|
0
|
|
|
|
|
|
$conf->{proxy} = $conf->{p}; |
20
|
0
|
|
|
|
|
|
return $conf; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# DEPRECATED- see distro WordPress::CLI instead |