aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Fripost/Schema/List.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Fripost/Schema/List.pm')
-rw-r--r--lib/Fripost/Schema/List.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Fripost/Schema/List.pm b/lib/Fripost/Schema/List.pm
index ad0902d..ec66f76 100644
--- a/lib/Fripost/Schema/List.pm
+++ b/lib/Fripost/Schema/List.pm
@@ -143,6 +143,29 @@ sub add {
}
+=item B<delete> (I<list>, I<domain>, I<OPTIONS>)
+
+Delete the given list. Note: this will NOT wipe the archives off the
+disk, but merely delete the list entry in the LDAP directory.
+
+=cut
+
+sub delete {
+ my $self = shift;
+ my $l = shift;
+ my $d = shift;
+ my %options = @_;
+
+ my $mesg = $self->ldap->delete( "fvl=$l,fvd=$d,".$self->suffix );
+ if ($mesg->code) {
+ if (defined $options{'-die'}) {
+ return $mesg->error unless $options{'-die'};
+ die $options{'-die'}."\n";
+ }
+ die $mesg->error;
+ }
+}
+
=back