3 package Devel::REPL::Plugin::Peek;
4 use Devel::REPL::Plugin;
6 use Devel::Peek qw(Dump);
8 use namespace::clean -except => [ 'meta' ];
10 with qw(Devel::REPL::Plugin::Turtles);
12 sub expr_command_peek {
13 my ( $self, $eval, $code ) = @_;
15 if ( my $cont = $self->can("continue_reading_if_necessary") ) {
16 $code = $self->$cont($code);
19 # can't override output properly
20 # FIXME do some dup wizardry
21 Dump( $self->eval($code) );
23 return ""; # this is a hack to print nothing after Dump has already printed. PLZ TO FIX KTHX!
34 Devel::REPL::Plugin::Peek - L<Devel::Peek> plugin for L<Devel::REPL>.
39 SV = PV(0xb3dba0) at 0xb4abc0
41 FLAGS = (POK,READONLY,pPOK)
42 PV = 0x12bcf70 "foo"\0
48 This L<Devel::REPL::Plugin> adds a C<peek> command that calls
49 L<Devel::Peek/Dump> instead of the normal printing.
53 L<Devel::REPL>, L<Devel::Peek>
57 Yuval Kogman E<lt>nothingmuch@woobling.orgE<gt>