in reply to Re: Dealing with blessed scalars when using YAML::XS::Load
in thread Dealing with blessed scalars when using YAML::XS::Load
tye,
Thank you for the solution. I'm sorry I did not include the output. It's a scalar ref.
Output:
I looked at unbless but we are changing YAML handling in a framework used by other people, so the solution needs to result in scalars or objects that can be treated like strings. I appreciate the suggestion though. Can you explain why you put the _alias step in? What is the advantage? I found this equally effective:java.util.UUID=SCALAR(0x100800e60) java.util.UUID
Again, thanks.BEGIN { { package YAML::Sucks::JavaUtilUUID; } $main::{'java.util.UUID::'} = $YAML::Sucks::{'JavaUtilUUID::'}; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Dealing with blessed scalars when using YAML::XS::Load (alias)
by tye (Sage) on May 02, 2012 at 16:07 UTC |
In Section
Seekers of Perl Wisdom