in reply to Re^3: Can I learn more about blessed data?
in thread Where can I learn more about blessed data?

> Dumper will show something like

In fact,

$ perl -MData::Dumper -MJSON -wE 'print Dumper decode_json("[true]")' $VAR1 = [ bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' ) ];
Note that it returns the PP for all of JSON::PP, JSON::XS, and Cpanel::JSON::XS.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^5: Can I learn more about blessed data?
by LanX (Saint) on Jan 08, 2021 at 19:12 UTC
    yes, \1 is read-only and can't be blessed, that's why they have to construct a scoped temporary scalar with my $o whose ref is returned by do

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery