H.Merijn Brand wrote:
> 
> On Fri 24 Oct 2003 11:00, Steffen Goeldner <[EMAIL PROTECTED]> wrote:
> > Is there any value in returning a value (pun intended)
> > from STORE? E.g.:
> >
> >   sub STORE  {
> >     ...
> >     return 1;
> >
> > For dbd_db_STORE_attrib(), DBI::DBD states:
> >
> >   The return value is TRUE if you have handled the
> >   attribute or FALSE otherwise.
> >
> > Does the same rule apply to STORE()? If so, where
> > is the returned value used?
> 
> What would you like to return? If it fails, the error
> handler should pick it up

I was amazed that all Perl DBD's try hard to return a value:

  DBD::ADO

    return $dbh->{AutoCommit} = _auto_commit($dbh, $value);
    return $dbh->{$attrib} = $value;
    return $value unless $@;
    return $dbh->SUPER::STORE($attrib, $value);

  DBD::ExampleP

    return $dbh->{$attrib} = $value if $attrib =~ /^examplep_/;
    return $dbh->SUPER::STORE($attrib, $value);

  DBD::NullP

    return 1 if $value; # is already set
    return $dbh->DBD::_::db::STORE($attrib, $value);

  DBD::Proxy

    return 1;
    return DBD::Proxy::proxy_set_err($dbh, $@) if $@; # returns undef
    return $result;
    return $dbh->SUPER::STORE($attr => $val);

  DBD::Sponge

    return 1 if $value; # is already set
    return $dbh->SUPER::STORE($attrib, $value);


Steffen

Reply via email to