line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::LDAP::Command::Del::Host; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use Modern::Perl; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
651
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
with qw( App::LDAP::Role::Command |
8
|
|
|
|
|
|
|
App::LDAP::Role::Bindable ); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
use App::LDAP::LDIF::Host; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub run { |
13
|
|
|
|
|
|
|
my ($self) = shift; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $hostname = $self->extra_argv->[2] or die "no hostname specified"; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $host = App::LDAP::LDIF::Host->search( |
18
|
|
|
|
|
|
|
base => config()->{nss_base_hosts}->[0], |
19
|
|
|
|
|
|
|
scope => config()->{nss_base_hosts}->[1], |
20
|
|
|
|
|
|
|
filter => "cn=$hostname", |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
$host->delete; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
27
|
|
|
|
|
|
|
no Moose; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |