Re: problem with large hash vanishing

From: David K. Wall (dwall_at_fastmail.fm)
Date: 02/03/04


Date: Tue, 03 Feb 2004 15:53:40 -0000

Jack <j.cawkwell@open.ac.uk> wrote:

> I have a perl v5.6.0 program, which reads a
> configuration file into a hash of hashes.

Depending on the format of the config file, you may be able to use a CPAN
module to do this (if you're not already doing so).

> The rest of the program does a fetch from
> an oracle database, and uses the configuration
> hash to do processing. After a number of
> successful loops the configuration hash
> vanishes, becoming undefined. I have used
> perl -d with the W command to watch the
> config hash change, but it does not get zapped
> to undefined in the debugger.
>
> Can anyone suggest what might be going wrong,

My crystal ball says you have a bug on line 537 that is overwriting your
hash.

> and what further debugging I could try?

No, because you didn't post any code.

> The program is a bit big to post, and it belongs
> to my employer.

I doubt we'd want to see the entire program anyway.

Standard advice: Break it down into a short, preferably self-contained test
case that exhibits the problem. The process of doing so often reveals the
problem (it usually works for me), and if not you have a snippet of code
you can post for us to look at.

-- 
David Wall


Relevant Pages

  • Re: Linux and audio pro
    ... >> filesystem, so there's nothing to get out of synch. ... > configuration information in a database. ... config file, for the app to start off with, and fine tuned by dynamic ... Additionally, things like postfix, can use db hash files (think ...
    (comp.os.linux.misc)
  • Re: problem with large hash vanishing
    ... > configuration file into a hash of hashes. ... > perl -d with the W command to watch the ...
    (comp.lang.perl.misc)
  • Re: basic class problem
    ... > All I want to do is print off the value of the hash refs at the moment ... > configuration details, unfortunately it bombs out and doesn't do anything. ... > sub get_conf{ ... > Mt CGI script is this: ...
    (perl.beginners)
  • problem with large hash vanishing
    ... configuration file into a hash of hashes. ... perl -d with the W command to watch the ... to undefined in the debugger. ...
    (comp.lang.perl.misc)
  • Re: ATI or Nvidia?
    ... I don't like too much having these proprietary drivers "tainting" my ... Usage: aticonfig... ... Parses an existing X-Server configuration file and modifies it to operate ...
    (comp.os.linux.hardware)