Subject: | Warnings if call lookup on new object |
Calling lookup on a newly created Array::IntSpan object issues warnings
instead of just returning undef. It also changes the underlying data
structure, which leads to further problems. Running the attached script
produces:
Use of uninitialized value in numeric le (<=) at
/usr/local/met/releases/ty/tools/lib/perl5/site_perl/5.8.0/Array/IntSpan.pm
line 409.
Use of uninitialized value in numeric ge (>=) at
/usr/local/met/releases/ty/tools/lib/perl5/site_perl/5.8.0/Array/IntSpan.pm
line 409.
Examining the data structure in the debugger:
main::(/tmp/fail:2): $A = Array::IntSpan->new;
DB<1> c 3
main::(/tmp/fail:3): $A->lookup(1);
DB<2> x $A
0 Array::IntSpan=ARRAY(0x8135078)
empty array
DB<3> n
Use of uninitialized value in numeric le (<=) at
/usr/local/met/releases/ty/tools/lib/perl5/site_perl/5.8.0/Array/IntSpan.pm
line 409.
Array::IntSpan::lookup('Array::IntSpan=ARRAY(0x8135078)',1)
called at /tmp/fail line 3
Use of uninitialized value in numeric ge (>=) at
/usr/local/met/releases/ty/tools/lib/perl5/site_perl/5.8.0/Array/IntSpan.pm
line 409.
Array::IntSpan::lookup('Array::IntSpan=ARRAY(0x8135078)',1)
called at /tmp/fail line 3
main::(/tmp/fail:4): 1;
DB<3> x $A
0 Array::IntSpan=ARRAY(0x8135078)
0 ARRAY(0x8332bd0)
empty array
For example, calling $A->get_range(1,3) works fine on the original $A,
but not after lookup has modified it.
Subject: | fail |
Message body not shown because it is not plain text.