in reply to Calling a subroutine via multiple dereferences.

So I am absolutely sure the problem is that the line $log_list{refaddr $self}->[0][0]->find_message_info($msg_info) is mis-behaving.
Well, I can't say I really understand it, so could well be.

Are you running strictly and with warnings? If not, then I think it's possible that your dereferencing is falling off the side of your data structure before it gets to the end of it, with no diagnostic. Try printing out the following expressions:

ref $log_list{refaddr $self} ref $log_list{refaddr $self}->[0] ref $log_list{refaddr $self}->[0][0] ref $log_list{refaddr $self}->[0][0]->find_message_info
to see whether you're getting as far as a reference of type CODE.

--
.sig : File not found.

Replies are listed 'Best First'.
Re^2: Calling a subroutine via multiple dereferences.
by DStaal (Chaplain) on Nov 04, 2008 at 18:30 UTC

    jethro (above) solved my problem: I was expecting behavior from one of my functions that no longer was the case...

    Of course I am using strict and warnings. Second thing I type in any Perl file. (After the #! line.) ;)

    I had actually played with that: sending the different references to Data::Dumper and seeing what I got. (As well as trying different variations on the dereferencing, and seeing what works.) The dereference string above correctly dereferences to a method in an object stored in a two-dimensional array in a hash.

    The code above now works, now that I've got _parse_args() able to parse it's own output again. (Which means find_message_info() is working correctly, which it wasn't.)