blib/lib/Ftree/DataParsers/SerializerFormat.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 43 CC 2 SCAR 10.6
CC
2
Cov
0%
createFamilyTreeDataFromFile
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.9
1 package Ftree::DataParsers::SerializerFormat;
2 use strict;
3 use warnings;
4 use version; our $VERSION = qv('2.3.41');
5 use Ftree::DataParsers::FieldValidatorParser;
6 use Ftree::DataParsers::ExtendedSimonWardFormat; # for getting pictures. Temporal solution
7 use Ftree::FamilyTreeData;
8 use Storable;
9 # use CGI::Carp qw(fatalsToBrowser);
10
11 sub createFamilyTreeDataFromFile {
12 my ($config_) = @_;
13 my $file_name = $config_->{file_name} or die "No file_name is given in config";
14
15 my $family_tree_data = Storable::retrieve($file_name);
16 if(defined $config_->{photo_dir}) {
17 Ftree::DataParsers::ExtendedSimonWardFormat::setPictureDirectory($config_->{photo_dir});
18 Ftree::DataParsers::ExtendedSimonWardFormat::fill_up_pictures($family_tree_data);
19 }
20
21 return $family_tree_data;
22 }
23
24 1;