Re: [siesta-dev] config woes again

[prev] [thread] [next] [lurker] [Date index for 2002/09/01]

From: Richard Clamp
Subject: Re: [siesta-dev] config woes again
Date: 18:45 on 01 Sep 2002
On Sun, Sep 01, 2002 at 01:07:48PM +0100, Simon Wistow wrote:
> The whole config/db system is starting to feel a bit byzantine, trying
> to work out what methods are available and where I should get variables
> from and stuff was tricky and it's kept me scratching my head most of
> this morning. I wasn't sure if I should be inheriting from Storage or
> Ima::DBI or what.

1/  add the low-level methods to Storage

what you seem to want is ->get_list_value( $list, $id ).

2/ attach higher-level accessors to List, User, and Plugin classes

I dunnmo excatly what and where, make something up.  I think you do
want to say $user->get_option( $list, 'spoo' ) and $list->get_option(
'spoo' ); You may also want the user to have global options.  Also you
could then have it sanely default all within the User method.

3/ Write the code that realises (1)

It may be time to take some pain and junk Class::DBI and rewrite
Stroage::DBI to use raw DBI calls in order to get niceness like
predictive connection.  Yes, it means writing a bit more monkey code,
but it does save a bunch of dependencies on overly magical code.

0/ is of course write the tests.  Let that inform the api that you'll
need.


> Unfortunately it doesn't work at the moment - Ima::DBI complains
> ...
> 
> t/08config................ok 2/5
> Can't locate object method "db_config" via package
> "Siesta::Config::User" at /usr/lib/perl5/site_perl/5.6.0/Ima/DBI.pm line 423.
> 
> Help and comments much appreciated.

I see no t/08config.t or a lib/Siesta/Confidg/User.pm, and I don't
have Debug::ESP installed on my laptop atm.  Make with the checkins.

-- 
Richard Clamp <richardc@xxxxxxxxx.xxx>

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