[prev] [thread] [next] [lurker] [Date index for 2002/09/10]
Update of /cvsroot/siesta/siesta/lib/Siesta In directory usw-pr-cvs1:/tmp/cvs-serv19714/Siesta Modified Files: Config.pm List.pm Message.pm Plugin.pm Storage.pm User.pm Log Message: perltidy Index: Config.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Config.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Config.pm 5 Sep 2002 13:19:24 -0000 1.8 +++ Config.pm 10 Sep 2002 18:23:23 -0000 1.9 @@ -6,9 +6,7 @@ use base qw(Ima::DBI); use Data::Dumper; -$DBFILE = '/home/simon/projects/siesta/siesta.db'; +$DBFILE = '/home/simon/projects/siesta/siesta.db'; $ARCHIVE_PATH = '/home/richardc/lab/siesta/archive'; - - 1; Index: List.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/List.pm,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- List.pm 8 Sep 2002 15:05:08 -0000 1.33 +++ List.pm 10 Sep 2002 18:23:28 -0000 1.34 @@ -27,7 +27,7 @@ my $class = shift; my $id = shift; - my %list = Siesta->storage->load_list( $id ); + my %list = Siesta->storage->load_list($id); return unless %list; return bless \%list, $class; @@ -86,10 +86,9 @@ sub delete { my $self = shift; - return Siesta->storage->delete_list($self) + return Siesta->storage->delete_list($self); } - =head2 ->config get and set config values for this User. @@ -104,8 +103,8 @@ =cut sub is_member { - my $self = shift; - my $member = shift; + my $self = shift; + my $member = shift; my $address = ref($member) ? $member->id() : $member; Siesta->storage->member_of_list( $self->id, $address ); } @@ -117,8 +116,8 @@ =cut sub add_member { - my $self = shift; - my $member = shift; + my $self = shift; + my $member = shift; my $address = ref $member ? $member->id : $member; return if $self->is_member($member); @@ -132,8 +131,8 @@ =cut sub remove_member { - my $self = shift; - my $member = shift; + my $self = shift; + my $member = shift; my $address = ref($member) ? $member->id() : $member; return unless $self->is_member($member); @@ -152,9 +151,9 @@ # this is inefficient as new() is going to do another select # i might change new() to accept an AoH and bless them after # cleanup ... - return map { - Siesta::User->new($_->{user_id}) - } Siesta->storage->list_members( $self->id ); + return + map { Siesta::User->new( $_->{user_id} ) } + Siesta->storage->list_members( $self->id ); } =head2 plugins() @@ -170,6 +169,5 @@ # this would make it consistent with members() Siesta->storage->list_plugins( $self->id ); } - 1; Index: Message.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Message.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Message.pm 8 Sep 2002 11:01:32 -0000 1.15 +++ Message.pm 10 Sep 2002 18:23:31 -0000 1.16 @@ -7,8 +7,7 @@ use constant debug => 0; -use Class::MethodMaker - get_set => [ qw( list user) ]; +use Class::MethodMaker get_set => [qw( list user)]; sub from { my $self = shift; @@ -18,7 +17,7 @@ sub subject { my $self = shift; if (@_) { - $self->head->replace('Subject', shift); + $self->head->replace( 'Subject', shift ); } $self->head->get('Subject'); } Index: Plugin.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Plugin.pm 10 Sep 2002 09:21:07 -0000 1.17 +++ Plugin.pm 10 Sep 2002 18:23:37 -0000 1.18 @@ -40,15 +40,14 @@ my $self = shift; my $mail = shift; - (my $package = ref $self) =~ s!^.*::!!; + ( my $package = ref $self ) =~ s!^.*::!!; my $list_id = defined $mail->list ? $mail->list->id() : undef; my $user_id = defined $mail->user ? $mail->user->id() : undef; - return Siesta->storage->config($package, $user_id, $list_id, @_); + return Siesta->storage->config( $package, $user_id, $list_id, @_ ); } - =item ->options() Returns a hashref, the keys of which are the various config options a @@ -68,6 +67,8 @@ 1; __END__ + =back =cut + Index: Storage.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Storage.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Storage.pm 10 Sep 2002 16:58:03 -0000 1.11 +++ Storage.pm 10 Sep 2002 18:23:41 -0000 1.12 @@ -7,7 +7,6 @@ bless { args => \@_ }, $class; } - # These are all virtual methods and are implemented # in a subclass like Siesta::Storage::DBI. If only # Perl had an interface keyword. @@ -20,8 +19,8 @@ sub save_list { die "virtual" } sub delete_list { die "virtual" } -sub get_lists { die "virtual" } -sub get_users { die "virtual" } +sub get_lists { die "virtual" } +sub get_users { die "virtual" } sub list_members { die "virtual" } sub member_of_list { die "virtual" } @@ -32,14 +31,14 @@ sub add_plugin_to_list { die "virtual" } sub set_list_plugins { die "virtual" } +sub user_lists { die "virtual" } -sub user_lists { die "virtual" } - -sub config { die "virtual" }; +sub config { die "virtual" } 1; __END__ + =item ->load_user( $id ) return a hash with a user in it, or nothing @@ -127,3 +126,4 @@ in order : per user-per list, per user, per list, system default. =cut + Index: User.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/User.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- User.pm 8 Sep 2002 15:00:43 -0000 1.14 +++ User.pm 10 Sep 2002 18:23:46 -0000 1.15 @@ -3,6 +3,7 @@ use strict; use Siesta; use vars qw(@fields); + # fuck the users, fuck them up their stupid asses BEGIN { @@ -11,7 +12,6 @@ use Class::MethodMaker get_set => \@fields; - =head1 NAME Siesta::User - manipulate a user @@ -26,9 +26,9 @@ sub new { my $class = shift; - my $id = shift; + my $id = shift; - my %user = Siesta->storage->load_user( $id ); + my %user = Siesta->storage->load_user($id); return unless %user; return bless \%user, $class; @@ -41,9 +41,9 @@ =cut -sub new_from_hash { - my $class = shift; - my $hash = shift; +sub new_from_hash { + my $class = shift; + my $hash = shift; return bless $hash, $class; } @@ -68,7 +68,7 @@ sub lists { my $self = shift; - return Siesta->storage->user_lists($self->id); + return Siesta->storage->user_lists( $self->id ); } =head2 ->save @@ -90,7 +90,7 @@ sub delete { my $self = shift; - return Siesta->storage->delete_user($self) + return Siesta->storage->delete_user($self); } =head2 ->config
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52