[prev] [thread] [next] [lurker] [Date index for 2002/09/12]
Update of /cvsroot/siesta/siesta/bin In directory usw-pr-cvs1:/tmp/cvs-serv14077/bin Modified Files: nacho Log Message: perltidy Index: nacho =================================================================== RCS file: /cvsroot/siesta/siesta/bin/nacho,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- nacho 12 Sep 2002 14:10:10 -0000 1.17 +++ nacho 12 Sep 2002 14:14:51 -0000 1.18 @@ -36,7 +36,7 @@ my @storage = @Siesta::Config::STORAGE; -if ($mode eq '-d') { +if ( $mode eq '-d' ) { @storage = split /\s/, shift; $mode = shift; } @@ -63,8 +63,6 @@ exit 0; - - =head1 COMMANDS You can optionally pass a database to act on (the default is the @@ -90,13 +88,11 @@ or die "Couldn't initialise the database\n"; } - sub _connect_database { - Siesta->connect(@_) + Siesta->connect(@_) or die "Couldn't connect to the database\n"; } - =head2 show-lists Show all the lists that are in the system, @@ -399,11 +395,13 @@ # TODO - create new user if not valid my $user = Siesta::User->new($user_id); - unless (defined $user) { - $user = Siesta::User->new_from_hash(id=>$user_id) || die "Couldn't create a new user\n"; - $user->save(); - print "Created a new user '$user_id' - don't forget to set more details for them\n"; - + unless ( defined $user ) { + $user = Siesta::User->new_from_hash( id => $user_id ) + || die "Couldn't create a new user\n"; + $user->save(); + print + "Created a new user '$user_id' - don't forget to set more details for them\n"; + } $list->add_member($user); @@ -824,7 +822,8 @@ sub usage { ( my $name = $0 ) =~ s!^.*[\\/]!!; - return join '', "Usage: $name <-d database>", join ( " ", map { "[$_]" } @modes ), + return join '', "Usage: $name <-d database>", + join ( " ", map { "[$_]" } @modes ), "\nSee the $name manpage for more details"; }
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52