1package Reply::Plugin::DataPrinter;
2our $AUTHORITY = 'cpan:DOY';
3$Reply::Plugin::DataPrinter::VERSION = '0.42';
4use strict;
5use warnings;
6# ABSTRACT: format results using Data::Printer
7
8use base 'Reply::Plugin';
9
10use Data::Printer alias => 'p', colored => 1, return_value => 'dump';
11
12
13sub mangle_result {
14    my ($self, @result) = @_;
15    return unless @result;
16    ( @result == 1 ) && return p($result[0]);
17    return p(@result);
18}
19
201;
21
22__END__
23
24=pod
25
26=encoding UTF-8
27
28=head1 NAME
29
30Reply::Plugin::DataPrinter - format results using Data::Printer
31
32=head1 VERSION
33
34version 0.42
35
36=head1 SYNOPSIS
37
38  ; .replyrc
39  [DataPrinter]
40
41=head1 DESCRIPTION
42
43This plugin uses L<Data::Printer> to format results.
44
45=head1 AUTHOR
46
47Jesse Luehrs <doy@tozt.net>
48
49=head1 COPYRIGHT AND LICENSE
50
51This software is Copyright (c) 2016 by Jesse Luehrs.
52
53This is free software, licensed under:
54
55  The MIT (X11) License
56
57=cut
58