update B::Concise plugin for error handling
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Plugin / Peek.pm
CommitLineData
1c4d0148 1#!/usr/bin/perl
2
3package Devel::REPL::Plugin::Peek;
4use Devel::REPL::Plugin;
5
6use Devel::Peek qw(Dump);
7
8use namespace::clean -except => [ 'meta' ];
9
10with qw(Devel::REPL::Plugin::Turtles);
11
12sub expr_command_peek {
13 my ( $self, $eval, $code ) = @_;
14
1c4d0148 15 # can't override output properly
16 # FIXME do some dup wizardry
17 Dump( $self->eval($code) );
18
19 return ""; # this is a hack to print nothing after Dump has already printed. PLZ TO FIX KTHX!
20}
21
22__PACKAGE__
23
24__END__
25
26=pod
27
28=head1 NAME
29
30Devel::REPL::Plugin::Peek - L<Devel::Peek> plugin for L<Devel::REPL>.
31
32=head1 SYNOPSIS
33
34 repl> #peek "foo"
35 SV = PV(0xb3dba0) at 0xb4abc0
36 REFCNT = 1
37 FLAGS = (POK,READONLY,pPOK)
38 PV = 0x12bcf70 "foo"\0
39 CUR = 3
40 LEN = 4
41
42=head1 DESCRIPTION
43
44This L<Devel::REPL::Plugin> adds a C<peek> command that calls
45L<Devel::Peek/Dump> instead of the normal printing.
46
47=head1 SEE ALSO
48
49L<Devel::REPL>, L<Devel::Peek>
50
51=head1 AUTHOR
52
53Yuval Kogman E<lt>nothingmuch@woobling.orgE<gt>
54
55=cut