blib/lib/Dancer2/Session/YAML.pm

filter: Statementstmt 100% 21 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 27 / 27 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Dancer2/Logger/Null.pm ↑ Summary examples/single/hello_world.psgi »
1 package Dancer2::Session::YAML;
2 5 $Dancer2::Session::YAML::VERSION = '2.3.0';
3 # ABSTRACT: YAML-file-based session backend for Dancer2
4  
5 5 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use Dancer2::Core::Types;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 5 ▶use YAML;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 has _suffix => (
10 is => 'ro',
11 isa => Str,
12 4 ▶ default => sub {'.yml'},
Subroutine __ANON__: called CC=1 SCAR=0.0
13 5 );
14  
15 5 with 'Dancer2::Core::Role::SessionFactory::File';
16  
17 21 ▶sub _freeze_to_handle {
Subroutine _freeze_to_handle: called CC=1 SCAR=0.0
18 21 my ( $self, $fh, $data ) = @_;
19 21 print {$fh} YAML::Dump($data);
20 21 return;
21 }
22  
23 16 ▶sub _thaw_from_handle {
Subroutine _thaw_from_handle: called CC=1 SCAR=0.0
24 16 my ( $self, $fh ) = @_;
25 16 local $YAML::LoadBlessed = 1;
26 16 return YAML::LoadFile($fh);
27 }
28  
29 5 1;
30  
31 __END__
« blib/lib/Dancer2/Logger/Null.pm ↑ Summary examples/single/hello_world.psgi »