Skip to content

Commit

Permalink
Various code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Mar 7, 2018
1 parent e0044ce commit 360f77b
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 11 deletions.
10 changes: 8 additions & 2 deletions Changes.md
@@ -1,5 +1,11 @@
# Change Log

## [0.0.6] - 2017-08-19

### Improved

- Generally made the class easier to subclass.

## [0.0.5] - 2017-08-19

### Improved
Expand All @@ -26,7 +32,7 @@
- Various packaing fixes for better kwalitee

## [0.0.1] - 2017-07-29

### Added

- All the things. Release early, release often.
9 changes: 4 additions & 5 deletions bin/timeline
Expand Up @@ -29,13 +29,13 @@ C<red>) or an RGB string as recognised by SVG (e.g. C<rgb(255,0,0)>).
An example input file might be:
World War I 1914 1918
World War II 1939 1945
World War I 1914 1918
World War II 1939 1945
Or, with colours included:
World War I 1914 1918 red
World War II 1939 1940 blue
World War I 1914 1918 red
World War II 1939 1940 blue
=head2 Command Line Options
Expand Down Expand Up @@ -81,7 +81,6 @@ GetOptions(

my $timeline = SVG::Timeline->new(%opts);

my @events;
while (<>) {
chomp;
my %rec;
Expand Down
8 changes: 5 additions & 3 deletions lib/SVG/Timeline.pm
Expand Up @@ -42,20 +42,19 @@ probably don't need any of these, but the following options are supported:
=cut


package SVG::Timeline;

use 5.010;

our $VERSION = '0.0.6';

use Moose;
use Moose::Util::TypeConstraints;
use SVG;
use List::Util qw[min max];
use Time::Piece;
use Carp;

our $VERSION = '0.0.6';

use SVG::Timeline::Event;

subtype 'ArrayOfEvents', as 'ArrayRef[SVG::Timeline::Event]';
Expand Down Expand Up @@ -415,6 +414,9 @@ sub years {
return $self->max_year - $self->min_year;
}

no Moose;
__PACKAGE__->meta->make_immutable;

=head1 AUTHOR
Dave Cross <dave@perlhacks.com>
Expand Down
3 changes: 3 additions & 0 deletions lib/SVG/Timeline/Event.pm
Expand Up @@ -83,6 +83,9 @@ sub draw_on {
)->cdata($self->text);
}

no Moose;
__PACKAGE__->meta->make_immutable;

=head1 AUTHOR
Dave Cross <dave@perlhacks.com>
Expand Down
3 changes: 2 additions & 1 deletion t/01-basic.t
@@ -1,4 +1,5 @@

use strict;
use warnings;
use Test::More;

use SVG::Timeline;
Expand Down
2 changes: 2 additions & 0 deletions t/load.t
@@ -1,3 +1,5 @@
use strict;
use warnings;
use Test::More;

BEGIN {
Expand Down
2 changes: 2 additions & 0 deletions xt/pod-coverage.t
@@ -1,3 +1,5 @@
use strict;
use warnings;
use Test::More;
eval "use Test::Pod::Coverage 1.00";
plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@;
Expand Down
2 changes: 2 additions & 0 deletions xt/pod.t
@@ -1,3 +1,5 @@
use strict;
use warnings;
use Test::More;

eval "use Test::Pod 1.00";
Expand Down

0 comments on commit 360f77b

Please sign in to comment.