in reply to Re^3: Why is Dumper returning "!!1" for true file test?
in thread Why is Dumper returning "!!1" for true file test?
Perl 5.36 does have "new" booleans. Copies of the immortal &PL_sv_yes and &PL_sv_no values are still identifiable as booleans. This means they can be serialized more accurately. The latest versions of JSON::PP, Data::Dumper, and Storable all support this.
Prior to perl 5.36 it was not possible to identify a boolean true value after it had been copied. The exact same SV type, flags, and values could be produced by normal usage of a string "1". A boolean false would be more identifiable as it would never be produced naturally, requiring dualvar to construct.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Why is Dumper returning "!!1" for true file test?
by ikegami (Patriarch) on Jan 22, 2024 at 16:10 UTC |