On Thursday 04 March 2004 09:30 am, Tim Bunce wrote:
> On Thu, Mar 04, 2004 at 09:46:56AM -0800, Jeff Zucker wrote:
> > Jeff Zucker wrote:
> > >Tim Bunce wrote:
> > >
> > >But why not just let the DBD::File subclasser define an f_valid_attrs
> > >hash and let DBD::File do it like this (only for lower-cased attribute
> > >names)
> > >
> > >       my $prefix = $dbh->{f_valid_attrs}->{_prefix};
> > >       if ( $prefix
> > >        and !$dbh->{f_valid_attrs}->{$attrib}
> > >        and $attrib =~ /^(f_|sql_|$prefix)/
> > >        ) {
> > >       return $dbh->set_err( 1,"Invalid attribute '$attrib'!");
> > >       }
> > >
> > >Has the same effect as what you proposed, but no STORE or FETCH in the
> > >subclassed driver.
> >
> > ... the other shoe drops.  My suggestion above is probably bad because
> > the driver may need to check the *value* as well as the attribute so it
> > should happen in the driver, not in DBD::File.
>
> Not just "check the value" but also possibly so something other than
> just simply store the value. Similarly for FETCH, some values may need
> to be created dynamically.
>
> > So I will put STORE and
> > FETCH into DBD::DBM.  Does this apply to statement  handles as well?
>
> Yeap.
>
> Tim.

But, speaking from a pure users' point of view:

If a module's test suite unconditionally contains a test, it should
have a chance to work on properly configured machines, or, some
sort of documantaion/diagnostic information should be available
in the module's package.

I know this is 'blead', and these problems are meant to be handled
here before the module is released. But back to my origional
points:

1) Shouln't DBM be registered in DBI by default?
2) The DBM tests should have a good chance to succeed.

Aloha => Beau;

Reply via email to