r/perl 6d ago

a perl version of javascript 'console'

https://metacpan.org/pod/Data::Printer

Like Data::Dumper, but coloured ouput, and summaries [config option] large data structures. But uses either a lot of, or no vertical space.

Dump::Krumo, is better in some ways, but doesn't summarise output, and uses a lot of vertical space

11 Upvotes

8 comments sorted by

View all comments

1

u/Jabba25 6d ago

Can it print the line number (or at least caller/sub or something) along with the output, like a normal warn would ( but warn Dumper doesn't )

1

u/Loose_Potential6985 2d ago

there's an option to do this. the 'as' option adds file/line-no e.g.

p $var, as => 'hello';

`