You are missing one level of indirection. The objects are the keys of the unblessed hash (except that objects can't be keys). Look at the code again:
$self->{START} = Emitter->new();
$self->{FAIR} = Emitter->new();
$self->{LOADED} = Emitter->new();
...
$self->{START}->transitions( { $self->{FAIR} => 0.5,
$self->{LOADED} => 0.5 } );
It does create 3 objects and then tries to set up 2 transitions using the anonymous hash. But the last line will already turn the object references into strings. It works as if it had been:
$self->{START}->transitions( { "Emitter=HASH(0x12345678)" => 0.5,
"Emitter=HASH(0xABCDABCD)" => 0.5 } );
|