Re: Caching DBIx::Recordset::Setup

2003-11-19 Thread Gerald Richter
Kee Hinckley wrote:
> There's an awful lot that goes on in that routine.  Typically I do
> this:
>
> $set = Setup
> series of operations with $set (insert/search/delete...)
> Is there any way to cache that initial $set?  For instance, if I call
> SetupObject, then everything is done except the ties.  In theory that
> ought to be reusable in some way, but I'm not sure how.  I need to be
> careful of the case where one routine is using a $set to do one thing
> and a routine it calls tries to use the same one to do something else.
>
> Any ideas?


You can use the $db -> TableAttr method to predeclare your parameters, but
this saves you only the parameter passing. (I use this to setup all
parameters in a central location) The actual setup is still taking place.

DBIx::Recordset caches a lot of things internaly, so the second setup of the
same object, will be much faster.

Gerald

--
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

Post:   Tulpenstrasse 5  D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED]  Voice:   +49 6133 939-122
WWW:http://www.ecos.de/  Fax: +49 6133 939-333
--
|
|   ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
|
+-


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Subclassing DBIx::Recordset

2003-11-19 Thread Gerald Richter
Kee Hinckley wrote:
> Has anyone tried subclassing DBIx::Recordset?  I've been playing with
> it and there are a couple issues that I've found.
>

I didn't have tried it so far

> 1. There are a number of places in the code where the current object
> is compared to DBIx::Recordset with an 'eq' rather than using an
> 'isa'.  That's pretty easy to fix.

This was a perfomance hack from times where webserver were really slow
compared to nowadays. This should be really fixed.

> 2. There are a number of places where the hash and array helper
> classes are called.  To do what I want I would need to subclass them
> as well.  Which means that I'd probably have to add functionality to
> allow the DBIx::Recordset class and subclasses to store the names of
> the helper classes they want to use.
>

Yes, this would be a good idea.

> At present I'm inclined towards using encapsulation instead, and
> making use of AUTOLOAD to redirect any unknown functions to the
> internal DBIx::Recordset object, but I wondered if anyone had any
> thoughts on the matter.

I would prefer to extent DBIx::Recordset, so it could be easily subclassed.

Since Terrence is now working on DBIx::Recordset, we hopefully will have a
new release with patches of the last year incoorporated soon.

Gerald


--
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

Post:   Tulpenstrasse 5  D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED]  Voice:   +49 6133 939-122
WWW:http://www.ecos.de/  Fax: +49 6133 939-333
--
|
|   ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
|
+-


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]