Skip Menu |

This queue is for tickets about the DBM-Deep CPAN distribution.

Report information
The Basics
Id: 64507
Status: stalled
Priority: 0/
Queue: DBM-Deep

People
Owner: Nobody in particular
Requestors: ed [...] linuxcrusaders.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: object method error in Reference.pm
Date: Wed, 05 Jan 2011 21:45:52 +0000
To: bug-DBM-Deep [...] rt.cpan.org
From: Edward <ed [...] linuxcrusaders.org>
Hi, I found a small error in the data function in Reference.pm: /opt/perl-5.12.2/lib/site_perl/5.12.2/DBM/Deep/Sector/File/Reference.pm I had to change return $obj->export; to return $obj->{export}; Otherwise I got the following error: Can't locate object method "export" via package "Alert" at /opt/perl-5.12.2/lib/site_perl/5.12.2/DBM/Deep/Sector/File/Reference.pm line 451. Regards, Edward Quick
On Wed Jan 05 16:45:15 2011, ed@linuxcrusaders.org wrote: Show quoted text
> > Hi, > > I found a small error in the data function in Reference.pm: > > /opt/perl-5.12.2/lib/site_perl/5.12.2/DBM/Deep/Sector/File/Reference.pm > > I had to change > > return $obj->export; > > to > > return $obj->{export};
I believe that change will actually cause problems for code that uses the return value of delete, because it will try to extract the ‘export’ key from the database, instead of copying what is in the database into an untied hash/array. Show quoted text
> > Otherwise I got the following error: > > Can't locate object method "export" via package "Alert" at > /opt/perl-5.12.2/lib/site_perl/5.12.2/DBM/Deep/Sector/File/Reference.pm > line 451.
What code are you using that triggers this error? The only way to produce that that I can think of is to bless a hash (or array) that has been extracted from the database. If that is what you are doing, this is something that DBM::Deep does not (and probably cannot) support. It will confuse DBM::Deep to no end, as the (re-)blessed objects will still be tied to the database. It may be possible for that to trigger a warning, but I’m not sure. Could you provide a test case (for the error)? Thank you.
By the way, sorry for the delay in responding.