Data::P...:Dumper(3)

hey bestie πŸ’– welcome to the Data::P...:Dumper(3) page from User Contributed Perl Documentation. this one is all about Data::Printer::Profile::Dumper, aka the profile that lets you use DDP like Data::Dumper. iykyk.

✨ NAME ✨

Data::Printer::Profile::Dumper β€” use DDP like Data::Dumper πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

okay so there are three ways to summon this profile, and they're all lowkey iconic.

While loading Data::Printer:

use DDP profile => 'Dumper';

While asking for a print:

p $var, profile => 'Dumper';

or in your .dataprinter file:

profile = Dumper

periodt. that's the whole vibe.

🌸 DESCRIPTION 🌸

okay so real talk: this profile tries to simulate Data::Dumper's output as closely as possible, using Data::Printer, even skipping types unsupported by Data::Dumper like lvalues and formats. iconic behavior honestly.

ngl it's not guaranteed to be 100% accurate, but hopefully it's close enough :)

πŸŽ€ Notable Diferences from Data::Dumper πŸŽ€

lowkey important: this profile tries to emulate Data::Dumper's output, NOT its behaviour. so some things are still happening in a much DDP-ish way. no cap.

  • no $VAR2, ...
  • return value
  • prototypes
  • still called 'p' (say alias = 'Dumper' if you want)
  • arg is always a reference, so on the top level, references to scalars will be rendered as scalars. References to references and inner references will be rendered properly.

πŸ’œ SEE ALSO πŸ’œ

you'll wanna peek at Data::Printer and Data::Dumper too 🫢


and that's the tea, bestie: perl v5.42.0, dated 2024-01-23, page Data::P...:Dumper(3) πŸ’–βœ¨

πŸ“¦ where this page comes from