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?
Testing never proves the absence of faults, it only shows their presence.
-- greengaroo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Possible issue with Moose ScalarRef
by tobyink (Canon) on Jan 11, 2013 at 15:44 UTC | |
by greengaroo (Hermit) on Jan 11, 2013 at 15:52 UTC |
In Section
Seekers of Perl Wisdom