On Fri, Jan 30, 2004 at 02:26:27PM +0000, Harry Jackson wrote:
> 
> >>   dbstring = "host=lhost dbname=name user=user password=pass"
> >>   .pcc_begin prototyped
> >>       .arg dbstring 
> >>           .pcc_call connect 
> >>           retconnect:
> >>       .result dbh
> >>   .pcc_end
> >>   print "New $dbh successful????\n"   
> >
> >
> >When we move to objects we'll add in the driver handle and call connect
> >as a method on that.
> 
> The actual connect call above is the DBDI call which then calls the 
> connect function on the driver.

Nooo. Ultimately it should be a method call on a dbr object which
will be blessed into DBD::<foo>::dr (the driver class).

There should be no "DBDI" intercepting calls up front (as far as
possible), only providing default methods in the base classes.

(I appreciate you're having to hack around the lack of method calls
so maybe that's why you're going that way, but it's not ideal.)


> I would like to put each arg in an array and pass that in rather than 
> having a massive arg list or would you rather have them all seperate.

Separate, "as per the DBI spec".

> >Is that returning a new PerlArray each time?
> >I think that should be another reference and have fetch() return
> >a reference to the same (internal) PerlArray each time.
> 
> It is buried in the driver somewhere so I will need to dig to find out. 
> If it is it should be easy to fix. Would you prefer to have the array 
> passed in as a parameter. This means we can create it before the loop 
> and reuse it.

No, "as per the DBI spec" "as per the DBI spec" "as per the DBI spec" :)
fetch() is a method on the sth that takes no params and returns an array ref.
Period.

Thanks.

Tim.

Reply via email to