From 675150f98a65de2b49b5ac1524798915b2f6dc86 Mon Sep 17 00:00:00 2001 From: ronsavage Date: Sun, 25 Jan 2015 14:12:09 +1100 Subject: [PATCH] Change bareword filehandles. Rename github repo --- Build.PL | 79 ++++++++++++++++++++++++++++++-------------- Changelog.ini | 18 ++++++---- CHANGES => Changes | 8 ++++- Makefile.PL | 3 ++ lib/HTML/Timeline.pm | 25 ++++++++------ 5 files changed, 91 insertions(+), 42 deletions(-) rename CHANGES => Changes (81%) diff --git a/Build.PL b/Build.PL index abe4a5e..335477d 100644 --- a/Build.PL +++ b/Build.PL @@ -1,29 +1,58 @@ +use strict; +use warnings; + use Module::Build; -Module::Build -> new +my $class = Module::Build->subclass(code => <<'EOF'); + +sub ACTION_authortest +{ + my($self) = @_; + + $self->depends_on('build'); + $self->depends_on('manifest'); + $self->depends_on('distmeta'); + + $self->test_files( qw< t xt/author > ); + $self->recursive_test_files(1); + + $self->depends_on('test'); + + return; +} +EOF + +$class -> new ( - module_name => 'HTML::Timeline', - license => 'artistic_2', - dist_abstract => 'Convert a Gedcom file into a Timeline file', - dist_author => 'Ron Savage ', - build_requires => - { - Test::More=> 0, -# Test::Pod => 1.45, # Make it optional. See t/pod.t - }, - configure_requires => - { - Module::Build => 0.3800, - }, - requires => - { - accessors => 0, - Carp => 0, - Config::IniFiles => 0, - Gedcom => 0, - Gedcom::Date => 0, - HTML::Template => 0, - Path::Class => 0, - }, - script_files => ['bin/timeline.pl'], + module_name => 'HTML::Timeline', + license => 'artistic_2', + dist_abstract => 'Convert a Gedcom file into a Timeline file', + dist_author => 'Ron Savage ', + build_requires => + { + 'Test::More' => 0, +# 'Test::Pod' => 1.45, # Make it optional. See t/pod.t + }, + configure_requires => + { + 'Module::Build' => 0.3800, + }, + meta_merge => + { + resources => + { + repository => 'https://github.com/ronsavage/HTML-Timeline', + }, + }, + requires => + { + 'accessors' => 0, + 'Carp' => 0, + 'Config::IniFiles' => 0, + 'Gedcom' => 0, + 'Gedcom::Date' => 0, + 'HTML::Template' => 0, + 'Path::Class' => 0, + }, + script_files => ['bin/timeline.pl'], ) -> create_build_script(); diff --git a/Changelog.ini b/Changelog.ini index 60fd27f..22cd65d 100644 --- a/Changelog.ini +++ b/Changelog.ini @@ -1,13 +1,19 @@ [Module] Name=HTML::Timeline -Changelog.Creator=Module::Metadata::Changes V 1.08 -Changelog.Parser=Config::IniFiles V 2.66 +Changelog.Creator=Module::Metadata::Changes V 2.05 +Changelog.Parser=Config::IniFiles V 2.83 [V 1.08] -Date=2011-02-15T17:00:00 +Date=2014-01-25T14:07:00 Comments= < $output_file_name") || Carp::croak "Can't open(> $output_file_name): $!"; - print OUT join("\n", @xml), "\n"; - close OUT; + open(my $fh, "> $output_file_name") || Carp::croak "Can't open(> $output_file_name): $!"; + print $fh join("\n", @xml), "\n"; + close $fh; $self -> log(sprintf($self -> format(), 'Created', $output_file_name) ); @@ -256,9 +256,9 @@ sub generate_xml_file $output_file_name = file($output_dir, $output_file_name); } - open(OUT, "> $output_file_name") || Carp::croak "Can't open(> $output_file_name): $!"; - print OUT $template -> output(); - close OUT; + open(my $fh, "> $output_file_name") || Carp::croak "Can't open(> $output_file_name): $!"; + print $fh $template -> output(); + close $fh; $self -> log(sprintf($self -> format(), 'Created', $output_file_name) ); @@ -500,7 +500,7 @@ help on unpacking and installing. new(...) returns an object of type C. -This is the class's contructor. +This is the class contructor. Usage: C<< HTML::Timeline -> new() >>. @@ -549,7 +549,7 @@ The default is 0. If this option is 1, people with missing birthdates are listed under the timeline, in a table. -If this option is 0, such people appear on the timeline, with today's date as their birthdate. +If this option is 0, such people appear on the timeline, with a date (today) as their birthdate. =item output_dir a_dir_name @@ -575,7 +575,8 @@ If this option is not used, 'timeline.tmpl' will be used. =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 timeline.html. +If this option is used, it becomes the prefix of the name of the output XML file written into +timeline.html. If this option is not used, no prefix is used. @@ -670,6 +671,10 @@ Ron Savage wrote bin/timeline.pl. examples/timeline.xml is the output of this program, using the default options. +=head1 Repository + +L + =head1 Author C was written by Ron Savage Iron@savage.net.auE> in 2008.