Skip to content

Make Data::Dumper boolean aware. #22297

Open
@EvanCarroll

Description

@EvanCarroll

Perl now has a literal syntax for

  • !!1 which makes to builtin::true
  • !!0 which maps to builtin::false

But when you use Dumper you see,

perl -MData::Dumper -E'say Data::Dumper::Dumper( { true => !!1, false => !!0 } );'
$VAR1 = {
          'false' => '',
          'true' => 1
        };

And you don't even see that these values pass builtin::is_bool. I think a better display would be.

perl -MData::Dumper -E'say Data::Dumper::Dumper( { true => !!1, false => !!0 } );'
$VAR1 = {
          'false' => *builtin::false,
          'true' => *builtin::true,
        };

But even the !!1 and !!0 would be great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dist-Data-Dumperissues in the dual-life blead-first Data-Dumper distribution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions