line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::Dumper::Perltidy; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
126742
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
83
|
|
4
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
122
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
12
|
use base 'Template::Plugin'; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
9728
|
|
9
|
2
|
|
|
2
|
|
354001
|
use Data::Dumper::Perltidy; |
|
2
|
|
|
|
|
632819
|
|
|
2
|
|
|
|
|
319
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
1
|
|
|
1
|
1
|
119203
|
my $class = shift; |
13
|
1
|
|
|
|
|
4
|
my $context = shift; |
14
|
1
|
|
|
|
|
8
|
bless { |
15
|
|
|
|
|
|
|
context => $context, |
16
|
|
|
|
|
|
|
}, $class; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub dump { |
20
|
1
|
|
|
1
|
0
|
60
|
my $self = shift; |
21
|
1
|
|
|
|
|
7
|
my $content = Dumper(@_); |
22
|
1
|
|
|
|
|
141640
|
return $content; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
__END__ |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 NAME |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Template::Plugin::Dumper::Perltidy - Template Toolkit plugin interface to Data::Dumper::Perltidy |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 SYNOPSIS |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
[% USE Dumper = Dumper::Perltidy %] |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
[% Dumper.dump(myvar) %] |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 DESCRIPTION |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
A very simple Template Toolkit Plugin Interface to the L<Data::Dumper::Perltidy> module. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
The Data::Dumper::Perltidy module is "Stringify and pretty print Perl data structures." like L<Data::Dumper>. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 SEE ALSO |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
L<Template>, L<Data::Dumper::Perltidy>, L<Template::Plugin::Dumper> |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 AUTHOR |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Fayland Lam, C<< <fayland at gmail.com> >> |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Copyright 2009 Fayland Lam, all rights reserved. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
57
|
|
|
|
|
|
|
under the same terms as Perl itself. |