in reply to Calling a subroutine via multiple dereferences.

In your test case you use $condition directly with find_message_info, while when called via find_message it goes through _parse_args(). Which means your conclusion is a bit premature, if I read that correctly.
  • Comment on Re: Calling a subroutine via multiple dereferences.

Replies are listed 'Best First'.
Re^2: Calling a subroutine via multiple dereferences.
by Anonymous Monk on Nov 03, 2008 at 15:51 UTC
    Well, since I happen to know that Mail::Trace::Postfix->find_message_info() also calls _parse_args(), I don't worry about that. (In fact, since they are both subclasses of the same class, they call the same _parse_args().) Sorry, I should probably have mentioned that.
      So in find_message _parse_args is called twice. Are you sure that _parse_args(_parse_args($data)) equals _parse_args($data) ? I'm not saying this is the problem, but it might be worthwile to print out the contents of $msg_info with Data::Dumper. I know from mistakes I make that they turn up at unexpected places.

        Actually, I think it gets called more than that...

        But, thanks for the pointer. I'd forgotten a change made someplace else that meant _parse_args() didn't quite output something it could input. As luck would have it, this only has an effect if I'm passing the to_address parameter.

        I changed the test to search on something else, and it works. So, I just need to fix that bug...

        (Note to self: Just because you have tested and know something works, that doesn't mean it works.)

        - DStaal