Skip to content

Improvement Data::Dumper: Print subroutine name in addition to "DUMMY" #23841

@KES777

Description

@KES777

Module: Data::Dumper

Description
It is Ok that "DUMMY" is printed when we are dumping data structures:

         '646bf00c61e5511ee787937eeb977dc4' => {
                                                  'cb' => sub { "DUMMY" },
                                                  'time' => '369044.528181794',
                                                  'after' => 360000,
                                                  'recurring' => 0
                                                }
        };

Expected behavior
It would be more helpful if Data::Dumper has an option to print subroutine names, Eg. "DUMMY Some::Module::sub" Or "DUMMY ANON:<file>:<line>". This will help a lot during debugging the code.

Example of a better output:

        io => {
          11 => {
            cb => sub{ "DUMMY Mojo::IOLoop::Stream::__ANON__[lib-nodebug/lib/perl5/Mojo/IOLoop/Stream.pm:62]" },
            mode => 7,
          },

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions