Still no time to dig, but it sounds like an tie inner vs outer issue.
If you're using the outer handle then you'll need to mg_get() to fire FETCH.
If that's not it then perhaps you could send me a patch (svn diff)
which'll get me to where you're at.

Tim.

On Mon, Mar 28, 2005 at 06:03:12PM -0500, Stas Bekman wrote:
> Tim Bunce wrote:
> >I've no time to dig, but this works:
> >
> >$ perl -MDBI -wl -e 'print
> >DBI->connect("dbi:Sponge:",undef,undef,{dbi_imp_data=>42})->{dbi_imp_data}'
> >42
> 
> It "works" only on the surface, the C code doesn't see it. Dumping the 
> hash keys for h with the above code, gives:
> 
>     dbih_setup_handle(DBI::db=HASH(0x8111140)=>DBI::db=HASH(0x8214c64), 
> DBD::Sponge::db,81b31a8, Null!)
>     key: ImplementorClass
>     key: Errstr
>     key: State
>     key: Name
>     key: Err
> 
> It sees only the above keys. Should something else be done to make that 
> new key seen?
> 
> 
> >Tim.
> >
> >On Mon, Mar 28, 2005 at 05:09:21PM -0500, Stas Bekman wrote:
> >
> >>Stas Bekman wrote:
> >>
> >>Tim, connect() never uses "dbi_imp_data" attribute
> >>
> >>in DBI.pm: sub _new_handle it lives in: $i->{Database}->'dbi_imp_data'
> >>
> >>$i = tie %hash, $class, $attr;
> >>{
> >>   'FetchHashKeyName' => 'NAME',
> >>   'TraceLevel' => 0,
> >>   'Database' => bless( {
> >>                         'FetchHashKeyName' => 'NAME',
> >>                         'TraceLevel' => 0,
> >>                         'dbi_imp_data' => '...',
> >>                         'ImplementorClass' => 'DBD::mysql::db',
> >>
> >>but dbih_setup_handle doesn't get to see it:
> >>
> >>dbih_setup_handle(SV *orv, char *imp_class, SV *parent, SV *imp_datasv)
> >>[...]
> >>   if (parent) {
> >>    parent_imp = DBIh_COM(parent);
> >>    if (DBIc_TYPE(parent_imp) == DBIt_DR && (svp = 
> >>    hv_fetch((HV*)SvRV(h), "dbi_imp_data", 12, 0))) {
> >>        dbi_imp_data = *svp;
> >>    }
> >>   }
> >>   else {
> >>    parent_imp = NULL;
> >>   }
> >>
> >>i.e. hv_fetch((HV*)SvRV(h), "dbi_imp_data", 12, 0))) never sees 
> >>dbi_imp_data.
> >>
> >>Something is missing. Ideas?
> >>
> >>-- 
> >>__________________________________________________________________
> >>Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> >>http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> >>mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> >>http://modperlbook.org http://apache.org   http://ticketmaster.com
> 
> 
> -- 
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to