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