DBIx/Class/Serialize/Storable.pm

filter: Statementstmt 70.8% 17 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 100% 2 / 2 totaltotal 72.7% 24 / 33 CC 2 SCAR 8.6
CC
2
Cov
71%
STORABLE_freeze
6.0
STORABLE_thaw
2.0
BEGIN
1.0
CRAP 2.4
« DBIx/Class/Storage/DBI/ADO.pm ↑ Summary DBIx/Class/InflateColumn/File.pm »
1 package DBIx::Class::Serialize::Storable;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use Storable();
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use DBIx::Class::Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 carp 'The Serialize::Storable component is now *DEPRECATED*. It has not '
10 .'been providing any useful functionality for quite a while, and in fact '
11 .'destroys prefetched results in its current implementation. Do not use!';
12  
13  
14 0 ▶sub STORABLE_freeze {
Subroutine STORABLE_freeze: not called CC=2 SCAR=17.9
Pod documented
15 0 my ($self, $cloning) = @_;
16 0 my $to_serialize = { %$self };
17  
18 # Dynamic values, easy to recalculate
19 0 delete $to_serialize->{$_} for qw/related_resultsets _inflated_column/;
20  
21 0 return (Storable::nfreeze($to_serialize));
22 }
23  
24 0 ▶sub STORABLE_thaw {
Subroutine STORABLE_thaw: not called CC=1 SCAR=6.9
Pod documented
25 0 my ($self, $cloning, $serialized) = @_;
26  
27 0 %$self = %{ Storable::thaw($serialized) };
28 }
29  
30 2 1;
31  
32 __END__
« DBIx/Class/Storage/DBI/ADO.pm ↑ Summary DBIx/Class/InflateColumn/File.pm »