Dear All

I want to create an Object in a ChildInit handler and then pass it to
request handlers.

Its a DB Object / module and it does some initialiastion, it prepares a
few statment handles and then stores them in an array for later
execution.

One solution is to create a the object in a child init handler and to
store it in a package global - and then to use a type glob to referance
it from other handlers by using that package global (detailed below).

However this appears as a bit of a kludge and does not have any repect
for encapsulation ;-).

I feel there must be a cleaner way of doing this ? A read of the guide
etc ... has not given me any clues.

Any ideas appreciated.

Greg Cope

### type glob example (off the top of my head - could be wrong)

package child_init;

use vars qw($foo);

$foo = My::db_handler->new();

#######

package request_handler;

*db = \$child_init::foo;

$db->foo();

Reply via email to