[Dxspider-support] DXUtil.pm and Data::Dumper
Helge Kruse
Helge.Kruse at t-online.de
Sun Sep 17 16:19:07 BST 2000
Hello Dirk,
in DXDb:: save and DXDb::load two functions are used: readfilestr and
writefilestr from DXUtil. These functions use Data::Dumper. There is a
malfunction considering this functions.
===== Symptom:
When using DBCREATE FOO you will find a file /spider/db/dbs.pl with the list
(!) of databases. This file does not contain the surrounding () I expected but
the {} version. The next time DXspider 1.43 starts, it will complain with
reading database descriptors ...
Odd number of elements in hash assignment at /spider/perl/DXDb.pm line 79.
at ./cluster.pl line 380
and crash at DBAVAIL:
package: dbavail
Can't call method "name" on an undefined value at (eval 23) line 14.
DXCommandmode::__ANON__('DXCommandmode=HASH(0x8752844)', '') called at /spider/perl/DXCommandmode.pm line 337
eval {...} called at /spider/perl/DXCommandmode.pm line 336
DXCommandmode::run_cmd('DXCommandmode=HASH(0x8752844)', 'dbavail') called at /spider/perl/DXCommandmode.pm line 180
DXCommandmode::normal('DXCommandmode=HASH(0x8752844)', 'dbavail') called at
./cluster.pl line 271
main::process_inqueue() called at ./cluster.pl line 403
-> D DJ1NA Can't call method "name" on an undefined value at (eval 23) line 14.
-> D DJ1NA at ./cluster.pl line 271
-> D DJ1NA DJ1NA de DJ1NA-6 17-Sep-2000 1525Z >
Use of uninitialized value at /spider/perl/DXDb.pm line 228.
at ./cluster.pl line 416
Can't call method "close" on unblessed reference at /spider/perl/DXDb.pm line 229.
DXDb::process() called at ./cluster.pl line 416
Can't call method "close" on unblessed reference at /spider/perl/DXDb.pm line 229.
===== Diagnosis:
I am not sure about that, but I think the surrounding {} should be replaced by
(). I cannot see why Data::Dumper writes the wrong characters.
===== Workaround:
After DBCREATE I use a text editor and modify /spider/db/dbs.pl. This doesn't
happen to often.
===== Environment:
Kernel: Linux 2.2.13#1 i686 unknown
Perl: 5.005_03 built for i586-linux
Data::Dumper: 2.101
Distribution: SuSE Linux 6.3
Kind Regards,
Helge, DJ1NA, Sysop DB0HRO.#MVP.DEU.EU
-------------- next part --------------
{
contest => bless( {
createt => 969191384,
lastt => 969191384,
name => 'contest',
accesst => 969197202
}, 'DXDb' ),
itu => bless( {
createt => 969204293,
lastt => 969204293,
name => 'itu',
accesst => 969204293
}, 'DXDb' ),
hamcall => bless( {
createt => 969203307,
lastt => 969203307,
name => 'hamcall',
accesst => 969203806
}, 'DXDb' ),
ov => bless( {
lastt => 969201138,
createt => 969201138,
name => 'ov',
accesst => 969201138
}, 'DXDb' ),
dok => bless( {
lastt => 969203408,
createt => 969203408,
name => 'dok',
accesst => 969203408
}, 'DXDb' )
}
More information about the Dxspider-support
mailing list