Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Absolute simplest way to keep a database variable persistent?

by dragonchild (Archbishop)
on Oct 04, 2008 at 20:49 UTC ( #715393=note: print w/ replies, xml ) Need Help??


in reply to Re: Absolute simplest way to keep a database variable persistent?
in thread Absolute simplest way to keep a database variable persistent?

DBM::Deep stores the blessed-ness of the object. That's been there since before I took it over. It would be somewhat useless if it didn't. :-)


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?


Comment on Re^2: Absolute simplest way to keep a database variable persistent?
Re^3: Absolute simplest way to keep a database variable persistent?
by natestraight (Novice) on Oct 06, 2008 at 13:50 UTC
    DBM::Deep seems to fail the first of your criteria for good software, though... unless something is screwy with my installation. *shrug*

    DBM::Deep sounds like it should do exactly what I want, but for the life of me I can't get it to work. I have copied line-for-line the script in the link in my original post that someone else was able to use for exactly the same task as my application, but it won't run. It gets killed during the cleanup stage with the error "Can't use an undefined value as a HASH reference in DBM/Deep/Hash.pm line 33."

    I have all the dependencies for DBM::Deep (and sub-dependencies) installed. I have made sure all of the versions are compatible. I don't have any other unnecessary Perl modules running. What's causing the "undefined value" error?

    Reading through some basic Perl tutorials online, I can see how the DBM::Deep scripts I copied should be working fine. I'm getting the sinking feeling, though, that I'm missing some simple change (like changing a *insert your local name here* type of reference in the example code to what it should actually be for my application; maybe the {foo} reference? I don't know) that should be obvious. It doesn't seem like the global destruction issue should be popping up and killing my scripts like it's doing.
      Yeah, I need to fix that installation problem. I'll get around to it soon. If you force the installation, it works just fine.

      Can you pare down your script to the simplest case that demonstrates that problem and email to me via CPAN? That sounds like it might be a very subtle bug in DBM::Deep. The page you're getting the example off of was using a much older version of DBM::Deep and I might have introduced a bug in the past two years.


      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
        Certainly. I'll try to get a simplified case that gives the same error, but does approximately the same thing.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://715393]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2014-12-18 06:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (43 votes), past polls