in reply to Re^3: OO: short memory?
in thread OO: short memory?
=pod Build up our list of hashes from 14th Chart of the Nuclides data. =cut my $hydrogen = {}; { $hydrogen->{element}{Z} = 1; $hydrogen->{name}{default} = 'Hydrogen'; $hydrogen->{name}{'en-CA'} = 'Hydrogen'; # Names for other countries/languages/charactersets. $hydrogen->{symbol}{default} = 'H'; $hydrogen->{symbol}{'en-CA'} = 'H'; # Symbols for other countries/languages/charactersets. $hydrogen->{element}{mass} = Materia::Variable::Generic->new({ value => '1.00794(7)', name => 'MolarMass', units => 'g', }); $hydrogen->{boilT} = Materia::Variable::Pressure->new({ value => '20.268', name => 'BoilT', units => 'K', pressure => { value => '101.325E3', units => 'Pa', }, });
There are 106 elements of data, each one has a stanza about twice as long as this snippet for Hydrogen. The object is to merge a bunch of different data sources (some on paper, some electronically readable) into a database. But that is how this got to be almost 10,000 lines long.
But the first creation of a Generic object, to store the Molar Mass of Hydrogen works. The next object to be created, the Boiling Point of Hydrogen (at a pressure of 1 atmosphere) fails.
As written in the original note, the ::Generic, ::Pressure, ::Temperature and ::PressureTemperature modules have new methods. These methods do very little, mostly they shuffle a little information and call _init() in the base class.
Anytime I find a problem, I redo the make/make install of these modules, so that what this program is loading when I run perldb in emacs is up to date. I don't just rerun the program from the beginning, I kill the perldb session in emacs and start it over again. But I have never run into this before where it looks like I have loaded the module, but at run time it can't find it. It's strange.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: OO: short memory?
by plobsing (Friar) on Jan 28, 2008 at 02:00 UTC | |
by Anonymous Monk on Jan 28, 2008 at 02:17 UTC |