5 package Devel::REPL::Plugin::Peek;
6 use Devel::REPL::Plugin;
8 use Devel::Peek qw(Dump);
10 use namespace::autoclean;
14 $self->load_plugin('Turtles');
17 sub expr_command_peek {
18 my ( $self, $eval, $code ) = @_;
20 my @res = $self->eval($code);
22 if ( $self->is_error(@res) ) {
23 return $self->format(@res);
25 # can't override output properly
26 # FIXME do some dup wizardry
28 return ""; # this is a hack to print nothing after Dump has already printed. PLZ TO FIX KTHX!
40 Devel::REPL::Plugin::Peek - L<Devel::Peek> plugin for L<Devel::REPL>.
45 SV = PV(0xb3dba0) at 0xb4abc0
47 FLAGS = (POK,READONLY,pPOK)
48 PV = 0x12bcf70 "foo"\0
54 This L<Devel::REPL::Plugin> adds a C<peek> command that calls
55 L<Devel::Peek/Dump> instead of the normal printing.
59 L<Devel::REPL>, L<Devel::Peek>
63 Yuval Kogman E<lt>nothingmuch@woobling.orgE<gt>