 Perl: the Markov chain saw  Re^2: Possible issue with Moose
ScalarRef  by greengaroo (Hermit) on Jan 11, 2013 at 15:12 UTC
( #1012900=note: print w/ replies, xml ) Need Help??  in reply
to Re: Possible issue with Moose ScalarRef in thread Possible
issue with Moose ScalarRef  Thanks for all your tests! It means
I'm not crazy! But that is a very strange behavior!  You
mentioned "changing data via the reference", I want to do the
opposite in fact, changing the data in the original variable so
I can reference to it from another object. I guess the result is
the same.  Anyway, I found a workaround, and it seems to do what
I want, but I still have a different SCALAR address for the
original and the reference. I now do this:  my $obj =
Something->new( { # Before: #'debug_level' =>
\$self->debug_level, # Now: 'debug_level' =>
\$self->{'debug_level'}, } );  Do you think it would always
work, or is it "random" like the previous way?   Comment on
Re^2: Possible issue with Moose ScalarRef Download Code Re^3:
Possible is