in reply to Odd scalar behaviour

I find it quite uneasy to translate this to the Perl dialect I know. Instead of $$queue{id}, I would write $queue->{id}. Do I understand it correctly, that $self is not an object, but a reference to an object, which itself is a blessed hash reference?

What does peekMessage do? It seems to depend on the fact whether stringification happened on $queueObject->{msmqLookupId}.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: Odd scalar behaviour
by SimonPratt (Friar) on Mar 20, 2014 at 08:39 UTC

    Yes, you understand it correctly. I just wasn't sure how else to get the thread to access the parent object without passing in a reference to the object. (I'm all ears if someone could explain how I could do this in a better way?)

    I've just gone with that style, as it is a style that everyone in the office here will understand.

    peekMessage is a wrapper around the OLE PeekByLookupId, intended to do a little bit of verification before attempting to access the OLE interface to MSMQ. You appear to be quite right in that it depends on stringification of the ID. I've added an sprintf to peekMessage and it now works perfectly without attempting a print