line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::LDAP::Command::Del::Ou; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use Modern::Perl; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
625
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
with qw( App::LDAP::Role::Command |
8
|
|
|
|
|
|
|
App::LDAP::Role::Bindable ); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has base => ( |
11
|
|
|
|
|
|
|
is => "rw", |
12
|
|
|
|
|
|
|
isa => "Str", |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use App::LDAP::LDIF::OrgUnit; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub run { |
18
|
|
|
|
|
|
|
my ($self, ) = @_; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
my $ouname = $self->extra_argv->[2] or die "no organization name specified"; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my $ou = App::LDAP::LDIF::OrgUnit->search( |
23
|
|
|
|
|
|
|
base => config()->{base}, |
24
|
|
|
|
|
|
|
scope => config()->{scope}, |
25
|
|
|
|
|
|
|
filter => "ou=$ouname", |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
$ou->delete; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=pod |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 NAME |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
App::LDAP::Command::Del::Ou - the handler for deleting Organization Units |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |