[prev] [thread] [next] [lurker] [Date index for 2002/09/09]
Update of /cvsroot/siesta/siesta/lib/Siesta In directory usw-pr-cvs1:/tmp/cvs-serv27279/lib/Siesta Modified Files: Plugin.pm Log Message: Some fixing. Index: Plugin.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Plugin.pm 9 Sep 2002 08:43:13 -0000 1.14 +++ Plugin.pm 9 Sep 2002 11:17:29 -0000 1.15 @@ -1,9 +1,15 @@ # $Id$ package Siesta::Plugin; use strict; +use vars qw/ $DESCRIPTION /; use Class::MethodMaker new => 'new'; + +$DESCRIPTION = "Base class for all Siesta::Plugins\n"; + + + =head1 NAME Siesta::Plugin - base class for Siesta Plugins @@ -43,11 +49,40 @@ my $mail = shift; - my $list_id = $mail->list->id || undef if defined $mail->list; - my $user_id = $mail->user->id || undef if defined $mail->user; + my $list_id = (defined $mail->list)? $mail->list->id() : undef; + my $user_id = (defined $mail->user)? $mail->user->id() : undef; + + $list_id ||= ''; + $user_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 plugin accepts. + +The value is another hashref which has the keys + +description - a short description of the option + +type - string, number, list, hash, boolean (1 or 0) + +default - the default value + +widget - what widget should be used in a gui to represent this + +This should be overridden by a deriving class. + +=cut + +sub options +{ + + return {}; + +} 1;
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52