Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^5: Using Data::Printer from the Perl debugger

by LanX (Saint)
on Mar 02, 2023 at 16:37 UTC ( [id://11150706]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Using Data::Printer from the Perl debugger
in thread Using Data::Printer from the Perl debugger

> of DB::Pluggable::Plugin::DataPrinter.pm are doing?

I don't know ... I was expecting them to monkey patch the sub for the p cmd. That's why $cmd is set, btw.

> en-reference non-scalars

you mean %h -> \%h ... IMHO this could be automatically done with a sub prototype ( like (\[%@$*]) )

> p command without doing that

p is for printing x for dumping,

I'd rather patch x

DB<1> $x=[1,2,3] DB<2> p $x ARRAY(0x32c8908) DB<3> x $x 0 ARRAY(0x32c8908) 0 1 1 2 2 3 DB<4>

FWIW you can test aliasing interactively with =

DB<4> h p p expr Same as "print {DB::OUT} expr" in current package. perldoc manpage Runs the external doc viewer perldoc command on the named Perl manpage, or on perldoc itself if omitted. Set $DB::doccmd to change viewer. DB<5> h x x expr Evals expression in list context, dumps the result. DB<6> h = = [alias value] Define a command alias, or list current aliases. DB<7>

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11150706]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-03-28 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found