summaryrefslogtreecommitdiffstats
path: root/lib/Reply/Plugin/DataPrinter.pm
blob: 2c0d93430e999aaddbe06873ba91743f0a57f945 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package Reply::Plugin::DataPrinter;
use strict;
use warnings;
# ABSTRACT: format results using Data::Printer

use base 'Reply::Plugin';

use Data::Printer alias => 'p', colored => 1;

=head1 SYNOPSIS

  ; .replyrc
  [DataPrinter]

=head1 DESCRIPTION

This plugin uses L<Data::Printer> to format results.

=cut

sub mangle_result {
    my ($self, @result) = @_;
    return unless @result;
    return p(@result, return_value => 'dump');
}

1;