ok, I already showed you the part where i build the array.
setting aside the template parsing, lets just say that inside the for
loop i try to look at one of the hash items:
for my $res(@results){
print STDERR $res->{'id'}."\n";
}
here is what shows up in the error log:
SOAP::Server::handle:
SOAP::Fault::new: ()
SOAP::SOM::DESTROY: ()
SOAP::Serializer::envelope: ()
SOAP::Serializer::envelope: Server Bad index while coercing array into
hash at /usr/local/apache/lib/perl/Search.pm line 38.
so it is obviously a Soap issue, and not one for this list, but, now i
have you intrigued!
anyway, if i instead do:
for my $res(@results){
print STDERR Dumper($res)."\n";
}
i get:
$VAR1 = [
{
'swishdbfile' => '/usr/local/indexes/ipn_ex_stem.index',
'newsweight' => '2',
'travelweight' => '2',
'subject' => undef,
'swishtitle' => undef,
'swishlastmodified' => 1103062907,
'weight' => 2,
'profile' => 'YCbCr',
'altkeys' => '7642302671 Robertstock-RM',
'sort_date' => undef,
'swishrank' => 1000,
'image_restrictions' => undef,
'released' => 'NOT RELEASED',
'swishfilenum' => 249065,
'swishreccount' => 1,
'sportsweight' => '2',
'tsize' => undef,
'swishdocpath' => '/usr/local/indexing/xml_base/76423/7642302671.xml',
'stem_sort' => undef,
'date_shot' => 'n/a',
'id' => '7642302671',
'scienceweight' => '1',
'adweight' => '-1',
'file_size' => '0.56',
'orig_id' => 'ACEUD0013GT',
'celebrityweight' => '2'
}
];
which seems to indicate that the hash is valid at least, i saw the
perldiag note on the error, but i didn't understand what it meant exactly.
thanks peter
Brad
------------------------------------------------------------
Brad Miele
Technology Director
IPNStock
(866) 476-7862 x902
bmiele@ipnstock.com
Absence makes the heart go wander.
On Mon, 24 Jan 2005, Peter Karman wrote:
>
>
> Brad Miele wrote on 1/24/05 3:27 PM:
>
> >
> > suddenly, whenever i try to access the items in the @swish_return array i
> > get this error:
> >
> > Bad index while coercing array into hash
> >
> > Data::Dumper shows the hash just fine.
> >
>
> that error is std perl from the perldiag man page:
>
> Bad index while coercing array into hash
> (F) The index looked up in the hash found as the 0'th element of a
> pseudo-hash is not legal. Index values must be at 1 or greater.
> See perlref.
>
>
> When you say Data::Dumper shows the hash just fine, are you dumping it just
> after returning from your swish_results() code? ie., just before passing it to
> the template parser?
>
> more code would help me...
>
> --
> Peter Karman . http://peknet.com/ . peter(at)not-real.peknet.com
>
Received on Mon Jan 24 13:53:49 2005