--- trunk/Nos.pm 2005/08/22 19:25:24 71 +++ trunk/Nos.pm 2005/08/22 20:24:04 72 @@ -16,7 +16,7 @@ our @EXPORT = qw( ); -our $VERSION = '0.6'; +our $VERSION = '0.7'; use Class::DBI::Loader; use Email::Valid; @@ -120,12 +120,12 @@ } -=head2 new_list +=head2 create_list Create new list. Required arguments are name of C, C address and path to C file. - $nos->new_list( + $nos->create_list( list => 'My list', from => 'Outgoing from comment', email => 'my-list@example.com', @@ -139,7 +139,7 @@ =cut -sub new_list { +sub create_list { my $self = shift; my $arg = {@_}; @@ -158,11 +158,11 @@ } -=head2 delete_list +=head2 drop_list Delete list from database. - my $ok = delete_list( + my $ok = drop_list( list => 'My list' aliases => '/etc/mail/mylist', ); @@ -171,7 +171,7 @@ =cut -sub delete_list { +sub drop_list { my $self = shift; my $args = {@_}; @@ -939,9 +939,9 @@ } -=head2 NewList +=head2 CreateList - $message_id = NewList( + $message_id = CreateList( list => 'My list', from => 'Name of my list', email => 'my-list@example.com' @@ -949,42 +949,42 @@ =cut -sub NewList { +sub CreateList { my $self = shift; my $aliases = $nos->{'aliases'} || croak "need 'aliases' argument to new constructor"; if ($_[0] !~ m/^HASH/) { - return $nos->new_list( + return $nos->create_list( list => $_[0], from => $_[1], email => $_[2], aliases => $aliases, ); } else { - return $nos->new_list( %{ shift @_ }, aliases => $aliases ); + return $nos->create_list( %{ shift @_ }, aliases => $aliases ); } } -=head2 DeleteList +=head2 DropList - $ok = DeleteList( + $ok = DropList( list => 'My list', ); =cut -sub DeleteList { +sub DropList { my $self = shift; my $aliases = $nos->{'aliases'} || croak "need 'aliases' argument to new constructor"; if ($_[0] !~ m/^HASH/) { - return $nos->delete_list( + return $nos->drop_list( list => $_[0], aliases => $aliases, ); } else { - return $nos->delete_list( %{ shift @_ }, aliases => $aliases ); + return $nos->drop_list( %{ shift @_ }, aliases => $aliases ); } }