line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
72919
|
use 5.006; # our |
|
4
|
|
|
|
|
11
|
|
2
|
4
|
|
|
4
|
|
14
|
use strict; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
63
|
|
3
|
4
|
|
|
4
|
|
13
|
use warnings; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
295
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package DBIx::Class::InflateColumn::Serializer::JSYNC; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.002001'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Basic JSON Object Serialization Support for DBIx::Class. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
4
|
|
|
4
|
|
1653
|
use JSYNC; |
|
4
|
|
|
|
|
6106
|
|
|
4
|
|
|
|
|
134
|
|
14
|
4
|
|
|
4
|
|
19
|
use Carp qw( croak ); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
683
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub get_freezer { |
17
|
3
|
|
|
3
|
1
|
10142
|
my ( undef, undef, $col_info, undef ) = @_; |
18
|
3
|
100
|
|
|
|
16
|
if ( defined $col_info->{'size'} ) { |
19
|
2
|
|
|
|
|
5
|
my $size = $col_info->{'size'}; |
20
|
|
|
|
|
|
|
return sub { |
21
|
2
|
|
|
2
|
|
4090097
|
my $v = JSYNC::Dumper->new()->dump( $_[0] ); |
22
|
2
|
100
|
|
|
|
739
|
croak('Value Serialization is too big') |
23
|
|
|
|
|
|
|
if length($v) > $size; |
24
|
1
|
|
|
|
|
7
|
return $v; |
25
|
2
|
|
|
|
|
10
|
}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
return sub { |
28
|
1
|
|
|
1
|
|
409916
|
return JSYNC::Dumper->new()->dump( $_[0] ); |
29
|
1
|
|
|
|
|
4
|
}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub get_unfreezer { |
33
|
|
|
|
|
|
|
return sub { |
34
|
2
|
|
|
2
|
|
196617
|
return JSYNC::Loader->new()->load( $_[0] ); |
35
|
3
|
|
|
3
|
1
|
21
|
}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |