On Mon, 7 May 2012 18:02:31 +0300, "Philip Stoev" <pst...@nuodb.com>
wrote:

> >> Can't set DBI::db=HASH(0x20e7098)->{State}: unrecognised attribute name 
> >> or
> >> invalid value at /usr/lib64/perl5/vendor_perl/DBI.pm line 720.
> >> Can't set DBI::db=HASH(0x20e7098)->{Errstr}: unrecognised attribute name 
> >> or
> >> invalid value at /usr/lib64/perl5/vendor_perl/DBI.pm line 720.
> >> Can't set DBI::db=HASH(0x20e7098)->{Driver}: unrecognised attribute name 
> >> or
> >> invalid value at /usr/lib64/perl5/vendor_perl/DBI.pm line 720.
> >> Can't set DBI::db=HASH(0x20e7098)->{Err}: unrecognised attribute name or
> >> invalid value at /usr/lib64/perl5/vendor_perl/DBI.pm line 720.
> >>
> >> How can I make them go away? Err and Errstr both work in my driver, so it
> >> seems to me I am handling them correctly.
> >>
> >> Thank you!
> >
> > Did you look at other DBD XS drivers?
> >
> 
> Yes I did, I used the MySQL, Firebird, Oracle and ODBC drivers as reference 
> but I can not figure out what I am doing differently from them.
> 
> >
> > It might also help to actually share the code yoiu suspect: the code
> > you have written to implement connect (). We could comment on that.
> >
> 
> The perl portion of connect() is here
> 
> https://github.com/nuodb/nuodb-drivers/blob/master/perl_dbi/lib/DBD/NuoDB.pm#L38
> 
> The C++ portion is here:
> 
> https://github.com/nuodb/nuodb-drivers/blob/master/perl_dbi/dbdimp.cpp#L11
> 
> Thank you.

You should probably add them like this:

sub driver {
        return $drh if $drh;

        my($class, $attr) = @_;
        $class .= "::dr";

        $drh = DBI::_new_drh($class, {
                'Name'          => 'NuoDB',
                'Version'       => $VERSION,
                'Err'           => \my $err,    # ADDED
                'Errstr'        => \my $errstr, # ADDED
                'State'         => \my $state,  # ADDED
                'Attribution'   => 'Perl DBI DBD NuoDB driver by Philip Stoev 
<pst...@nuodb.com>',
        });

        return $drh;
}

Does that help?

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.14   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Reply via email to