line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
40999
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
60
|
|
2
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
108
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Format results with Data::Dump::Streamer |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.003029'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Devel::REPL::Plugin; |
8
|
2
|
|
|
2
|
|
11
|
use Data::Dump::Streamer (); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
15
|
|
9
|
2
|
|
|
2
|
|
9785
|
use namespace::autoclean; |
|
2
|
|
|
|
|
43567
|
|
|
2
|
|
|
|
|
53
|
|
10
|
2
|
|
|
2
|
|
13
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
22
|
|
11
|
|
|
|
|
|
|
around 'format_result' => sub { |
12
|
|
|
|
|
|
|
my $orig = shift; |
13
|
|
|
|
|
|
|
my $self = shift; |
14
|
|
|
|
|
|
|
my @to_dump = @_; |
15
|
|
|
|
|
|
|
my $out; |
16
|
|
|
|
|
|
|
if (@to_dump > 1 || ref $to_dump[0]) { |
17
|
|
|
|
|
|
|
if (@to_dump == 1 && overload::Method($to_dump[0], '""')) { |
18
|
|
|
|
|
|
|
$out = "@to_dump"; |
19
|
|
|
|
|
|
|
} else { |
20
|
|
|
|
|
|
|
my $dds = Data::Dump::Streamer->new; |
21
|
|
|
|
|
|
|
$dds->Freezer(sub { "$_[0]"; }); |
22
|
|
|
|
|
|
|
$dds->Data(@to_dump); |
23
|
|
|
|
|
|
|
$out = $dds->Out; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} else { |
26
|
|
|
|
|
|
|
$out = $to_dump[0]; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
$self->$orig($out); |
29
|
|
|
|
|
|
|
}; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=encoding UTF-8 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Devel::REPL::Plugin::DDS - Format results with Data::Dump::Streamer |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
version 1.003029 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 SYNOPSIS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# in your re.pl file: |
49
|
|
|
|
|
|
|
use Devel::REPL; |
50
|
|
|
|
|
|
|
my $repl = Devel::REPL->new; |
51
|
|
|
|
|
|
|
$repl->load_plugin('DDS'); |
52
|
|
|
|
|
|
|
$repl->run; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
# after you run re.pl: |
55
|
|
|
|
|
|
|
$ map $_*2, ( 1,2,3 ) |
56
|
|
|
|
|
|
|
$ARRAY1 = [ |
57
|
|
|
|
|
|
|
2, |
58
|
|
|
|
|
|
|
4, |
59
|
|
|
|
|
|
|
6 |
60
|
|
|
|
|
|
|
]; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
$ |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 SUPPORT |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=Devel-REPL> |
67
|
|
|
|
|
|
|
(or L<bug-Devel-REPL@rt.cpan.org|mailto:bug-Devel-REPL@rt.cpan.org>). |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
There is also an irc channel available for users of this distribution, at |
70
|
|
|
|
|
|
|
L<C<#devel> on C<irc.perl.org>|irc://irc.perl.org/#devel-repl>. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 AUTHOR |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>) |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This software is copyright (c) 2007 by Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>). |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
81
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=cut |