diff --git a/Build.PL b/Build.PL index 283da0f..2d2704e 100644 --- a/Build.PL +++ b/Build.PL @@ -32,12 +32,12 @@ $class -> new dist_author => 'Ron Savage ', build_requires => { - 'Test::More' => 0, -# 'Test::Pod' => 1.45, # Make it optional. See t/pod.t + 'Test::More' => 1.001014, + 'Test::Pod' => 1.48, }, configure_requires => { - 'Module::Build' => 0.3800, + 'Module::Build' => 0.4211, }, requires => { @@ -51,9 +51,9 @@ $class -> new }, resources => { - bugtracker => 'https://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Timeline', - license => 'http://opensource.org/licenses/Artistic-2.0', - repository => 'https://github.com/ronsavage/HTML-Timeline', + 'bugtracker' => 'https://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Timeline', + 'license' => 'http://opensource.org/licenses/Artistic-2.0', + 'repository' => 'https://github.com/ronsavage/HTML-Timeline', }, - script_files => ['bin/timeline.pl'], + 'script_files' => ['bin/timeline.pl'], ) -> create_build_script(); diff --git a/MYMETA.json b/MYMETA.json index e49a89c..6bb8551 100644 --- a/MYMETA.json +++ b/MYMETA.json @@ -4,35 +4,36 @@ "Ron Savage " ], "dynamic_config" : 0, - "generated_by" : "Module::Build version 0.4211", + "generated_by" : "Module::Build version 0.4231", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" + "version" : 2 }, "name" : "HTML-Timeline", "prereqs" : { "build" : { "requires" : { - "Test::More" : "0" + "Test::More" : 1.001014, + "Test::Pod" : 1.48 } }, "configure" : { "requires" : { - "Module::Build" : "0.38" + "Module::Build" : 0.4211 } }, "runtime" : { "requires" : { - "Carp" : "0", - "Config::IniFiles" : "0", - "Gedcom" : "0", - "Gedcom::Date" : "0", - "HTML::Template" : "0", - "Path::Class" : "0", - "accessors" : "0" + "Carp" : 0, + "Config::IniFiles" : 0, + "Gedcom" : 0, + "Gedcom::Date" : 0, + "HTML::Template" : 0, + "Path::Class" : 0, + "accessors" : 0 } } }, @@ -48,5 +49,6 @@ "http://www.perlfoundation.org/artistic_license_2_0" ] }, - "version" : "1.08" + "version" : "1.08", + "x_serialization_backend" : "JSON::PP version 4.11" } diff --git a/Makefile.PL b/Makefile.PL index ebe6e44..2ed33f6 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -31,13 +31,13 @@ my(%params) = PL_FILES => {}, PREREQ_PM => { - accessors => 0, - Carp => 0, - Config::IniFiles => 0, - Gedcom => 0, - Gedcom::Date => 0, - HTML::Template => 0, - Path::Class => 0, + 'accessors' => 0, + 'Carp' => 0, + 'Config::IniFiles' => 0, + 'Gedcom' => 0, + 'Gedcom::Date' => 0, + 'HTML::Template' => 0, + 'Path::Class' => 0, }, VERSION_FROM => 'lib/HTML/Timeline.pm', ); diff --git a/bin/timeline.pl b/bin/timeline.pl old mode 100644 new mode 100755 diff --git a/lib/HTML/Timeline.pm b/lib/HTML/Timeline.pm index 5455e84..000bf2f 100644 --- a/lib/HTML/Timeline.pm +++ b/lib/HTML/Timeline.pm @@ -30,6 +30,7 @@ template_dir template_name timeline_height url_for_xml +validate verbose web_page xml_file @@ -256,7 +257,7 @@ sub generate_xml_file $output_file_name = file($output_dir, $output_file_name); } - open(my $fh, "> $output_file_name") || Carp::croak "Can't open(> $output_file_name): $!"; + open($fh, '>', $output_file_name) || Carp::croak "Can't open(> $output_file_name): $!"; print $fh $template -> output(); close $fh; @@ -321,6 +322,7 @@ template_dir template_name timeline_height url_for_xml +validate verbose web_page xml_file @@ -342,6 +344,7 @@ xml_file $self -> timeline_height(500); $self -> url_for_xml(''); $self -> verbose(0); + $self -> validate(1); $self -> web_page('timeline.html'); $self -> xml_file('timeline.xml'); @@ -403,7 +406,7 @@ xml_file ) ); - if (! $self -> gedobj() -> validate() ) + if($arg{'options'}{'validate'} && (! $self -> gedobj() -> validate() )) { Carp::croak 'Cannot validate file: ' . $self -> gedcom_file(); } @@ -430,7 +433,8 @@ sub run $self -> log('Processing:'); my($root_person) = $self -> gedobj() -> get_individual($self -> root_person() ); - my($name) = $self -> clean_persons_name($root_person -> name() ); + my($name) = $self -> clean_persons_name($root_person -> name() ); + my(@people); @@ -573,6 +577,12 @@ If this option is used, HTML::Template will look for a file of this name. If this option is not used, 'timeline.tmpl' will be used. +=item validate + +If this option is used, HTML::Template will valide the Gedcom file. + +The default value is 1. + =item url_for_xml a_url If this option is used, it becomes the prefix of the name of the output XML file written into