File Coverage

blib/lib/Devel/REPL/Plugin/Peek.pm
Criterion Covered Total %
statement 17 23 73.9
branch 0 2 0.0
condition n/a
subroutine 6 7 85.7
pod 0 2 0.0
total 23 34 67.6


line stmt bran cond sub pod time code
1 2     2   2406 use strict;
  2         5  
  2         58  
2 2     2   10 use warnings;
  2         3  
  2         107  
3             # ABSTRACT: L<Devel::Peek> plugin for L<Devel::REPL>.
4              
5             our $VERSION = '1.003029';
6              
7             use Devel::REPL::Plugin;
8 2     2   11 use Devel::Peek qw(Dump);
  2         4  
  2         12  
9 2     2   10512 use namespace::autoclean;
  2         784  
  2         10  
10 2     2   168  
  2         4  
  2         14  
11             my $self = shift;
12             $self->load_plugin('Turtles');
13 1     1 0 3 }
14 1         5  
15             my ( $self, $eval, $code ) = @_;
16              
17             my @res = $self->eval($code);
18 0     0 0    
19             if ( $self->is_error(@res) ) {
20 0           return $self->format(@res);
21             } else {
22 0 0         # can't override output properly
23 0           # FIXME do some dup wizardry
24             Dump(@res);
25             return ""; # this is a hack to print nothing after Dump has already printed. PLZ TO FIX KTHX!
26             }
27 0           }
28 0            
29             __PACKAGE__
30              
31              
32             =pod
33              
34             =encoding UTF-8
35              
36             =head1 NAME
37              
38             Devel::REPL::Plugin::Peek - L<Devel::Peek> plugin for L<Devel::REPL>.
39              
40             =head1 VERSION
41              
42             version 1.003029
43              
44             =head1 SYNOPSIS
45              
46             repl> #peek "foo"
47             SV = PV(0xb3dba0) at 0xb4abc0
48             REFCNT = 1
49             FLAGS = (POK,READONLY,pPOK)
50             PV = 0x12bcf70 "foo"\0
51             CUR = 3
52             LEN = 4
53              
54             =head1 DESCRIPTION
55              
56             This L<Devel::REPL::Plugin> adds a C<peek> command that calls
57             L<Devel::Peek/Dump> instead of the normal printing.
58              
59             =head1 SEE ALSO
60              
61             L<Devel::REPL>, L<Devel::Peek>
62              
63             =head1 SUPPORT
64              
65             Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=Devel-REPL>
66             (or L<bug-Devel-REPL@rt.cpan.org|mailto:bug-Devel-REPL@rt.cpan.org>).
67              
68             There is also an irc channel available for users of this distribution, at
69             L<C<#devel> on C<irc.perl.org>|irc://irc.perl.org/#devel-repl>.
70              
71             =head1 AUTHOR
72              
73             Yuval Kogman E<lt>nothingmuch@woobling.orgE<gt>
74              
75             =head1 COPYRIGHT AND LICENCE
76              
77             This software is copyright (c) 2007 by Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>).
78              
79             This is free software; you can redistribute it and/or modify it under
80             the same terms as the Perl 5 programming language system itself.
81              
82             =cut