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