line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Format::Pretty::Ruby; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
393
|
use 5.010001; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
4
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
31
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
473
|
use Data::Dump::Ruby qw(dump_ruby); |
|
1
|
|
|
|
|
6181
|
|
|
1
|
|
|
|
|
143
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
require Exporter; |
10
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw(format_pretty); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = '0.02'; # VERSION |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub format_pretty { |
16
|
1
|
|
|
1
|
1
|
996
|
my ($data, $opts) = @_; |
17
|
1
|
|
50
|
|
|
5
|
$opts //= {}; |
18
|
1
|
|
|
|
|
5
|
dump_ruby($data); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
# ABSTRACT: Pretty-print data structure as Ruby code |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
__END__ |