File Coverage

blib/lib/MVC/Neaf/View/Dumper.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 21 21 100.0


line stmt bran cond sub pod time code
1             package MVC::Neaf::View::Dumper;
2              
3 3     3   1001 use strict;
  3         6  
  3         86  
4 3     3   13 use warnings;
  3         5  
  3         118  
5              
6             our $VERSION = '0.2800_01';
7              
8             =head1 NAME
9              
10             MVC::Neaf::View::Dumper - Data::Dumper interface for Not Even A Framework
11              
12             =head1 USAGE
13              
14             Use the following to debug your application:
15              
16             perl -MMVC::Neaf=view,Dumper '/path/to?foo=42&bar=137'
17              
18             Maybe this module could also be useful if you want to frighten you site's
19             users to death on April, 1.
20              
21             =head1 METHODS
22              
23             =cut
24              
25 3     3   1718 use Data::Dumper;
  3         17940  
  3         192  
26 3     3   21 use parent qw(MVC::Neaf::View);
  3         5  
  3         17  
27              
28             =head2 render( \%data )
29              
30             Return a Perl dump and "text/plain".
31              
32             =cut
33              
34             sub render {
35 2     2 1 7 my ($self, $data) = @_;
36              
37 2         4 local $Data::Dumper::Indent = 1;
38              
39 2         6 return (Dumper($data), "text/plain");
40             };
41              
42             =head1 LICENSE AND COPYRIGHT
43              
44             This module is part of L suite.
45              
46             Copyright 2016-2023 Konstantin S. Uvarin C.
47              
48             This program is free software; you can redistribute it and/or modify it
49             under the terms of either: the GNU General Public License as published
50             by the Free Software Foundation; or the Artistic License.
51              
52             See L for more information.
53              
54             =cut
55              
56             1;