[siesta-commit] siesta/lib/Siesta List.pm,1.20,1.21 Plugin.pm,1.7,1.8 Storage.pm,1.5,1.6 User.pm,1.5,1.6

[prev] [thread] [next] [lurker] [Date index for 2002/08/28]

From: clampr
Subject: [siesta-commit] siesta/lib/Siesta List.pm,1.20,1.21 Plugin.pm,1.7,1.8 Storage.pm,1.5,1.6 User.pm,1.5,1.6
Date: 11:06 on 28 Aug 2002
Update of /cvsroot/siesta/siesta/lib/Siesta
In directory usw-pr-cvs1:/tmp/cvs-serv15392/lib/Siesta

Modified Files:
	List.pm Plugin.pm Storage.pm User.pm 
Log Message:
bigass ->connect ->storage refactor

Index: List.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/List.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- List.pm	26 Aug 2002 22:50:31 -0000	1.20
+++ List.pm	28 Aug 2002 10:06:28 -0000	1.21
@@ -18,9 +18,8 @@
 use strict;
 use Class::MethodMaker get_set => [ qw( id owner post_address return_path created ) ];
 
+use Siesta;
 use Siesta::User;
-use Siesta::Storage::DBI;
-my $storage = Siesta::Storage::DBI->new();
 
 =head2 new(id)
 
@@ -32,7 +31,7 @@
     my $class = shift;
     my $id    = shift;
 
-    my %list = $storage->load_list( $id );
+    my %list = Siesta->storage->load_list( $id );
     return unless %list;
 
     return bless \%list, $class;
@@ -50,7 +49,7 @@
     my $self = shift;
     my $member = shift;
     my $address = ref($member) ? $member->id() : $member;
-    $storage->member_of_list( $self->id, $address );
+    Siesta->storage->member_of_list( $self->id, $address );
 }
 
 =head2 ->add_member( $member )
@@ -65,7 +64,7 @@
     my $address = ref $member ? $member->id : $member;
 
     return if $self->is_member($member);
-    return $storage->add_member_to_list( $self->id, $address );
+    return Siesta->storage->add_member_to_list( $self->id, $address );
 }
 
 =head2 ->remove_member( $member )
@@ -80,7 +79,7 @@
     my $address = ref($member) ? $member->id() : $member;
 
     return unless $self->is_member($member);
-    return $storage->remove_member_from_list( $self->id, $address );
+    return Siesta->storage->remove_member_from_list( $self->id, $address );
 }
 
 =head2 members()
@@ -97,7 +96,7 @@
     # cleanup ...
     return map {
         new Siesta::User $_->user_id
-    } $storage->list_members( $self->id );
+    } Siesta->storage->list_members( $self->id );
 }
 
 =head2 plugins()
@@ -111,7 +110,7 @@
 
     # you could change this, so it returned the Plugin objects,
     # this would make it consistent with members()
-    $storage->list_plugins( $self->id );
+    Siesta->storage->list_plugins( $self->id );
 }
 
 1;

Index: Plugin.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Plugin.pm	23 Aug 2002 14:26:38 -0000	1.7
+++ Plugin.pm	28 Aug 2002 10:06:29 -0000	1.8
@@ -17,9 +17,9 @@
 
 =head1 DESCRIPTION
 
-=over
-
 =head2 Methods
+
+=over
 
 =item ->process( $message );
 

Index: Storage.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Storage.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Storage.pm	26 Aug 2002 22:57:30 -0000	1.5
+++ Storage.pm	28 Aug 2002 10:06:29 -0000	1.6
@@ -4,7 +4,7 @@
 
 sub new {
     my $class = shift;
-    bless {}, $class;
+    bless { args => \@_ }, $class;
 }
 
 

Index: User.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/User.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- User.pm	26 Aug 2002 22:50:31 -0000	1.5
+++ User.pm	28 Aug 2002 10:06:29 -0000	1.6
@@ -5,14 +5,13 @@
 use Class::MethodMaker
   get_set       => [ 'id', 'forename', 'surname' ];
 
-use Siesta::Storage::DBI;
-my $storage = Siesta::Storage::DBI->new();
+use Siesta;
 
 sub new {
     my $class = shift;
     my $id = shift;
 
-    my %user = $storage->load_user( $id );
+    my %user = Siesta->storage->load_user( $id );
     return unless %user;
 
     return bless \%user, $class;



Generated at 13:57 on 01 Jul 2004 by mariachi 0.52