« lib/Ftree/FamilyTreeGraphics.pm
↑ Summary
blib/lib/Ftree/TextGenerators/RomanianTextGenerator.pm »
| 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; |