From: Matt S Trout Date: Wed, 13 May 2009 13:41:47 +0000 (+0100) Subject: refactor a bit, add post class in prep for testing X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f79d4b5c5c0ce072a6d76774994c98407edb009b;p=engit%2FIron-Munger.git refactor a bit, add post class in prep for testing --- diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..43b8dd2 --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,11 @@ +use strict; +use warnings; +use inc::Module::Install; + +name 'IronMunger'; + +requires 'MooseX::Declare'; +requires 'signatures'; +requires 'autobox::DateTime::Duration'; + +WriteAll; diff --git a/lib/IronMunger/Calculate.pm b/lib/IronMunger/Calculate.pm index 1178c81..76aa983 100644 --- a/lib/IronMunger/Calculate.pm +++ b/lib/IronMunger/Calculate.pm @@ -2,8 +2,8 @@ package IronMunger::Calculate; use strict; use warnings; -use signatures; use autobox::DateTime::Duration; +use signatures; sub check_post_gap ($aperture, $days, @posts) { return @posts if @posts <= $aperture; diff --git a/lib/IronMunger/Post.pm b/lib/IronMunger/Post.pm new file mode 100644 index 0000000..2b43897 --- /dev/null +++ b/lib/IronMunger/Post.pm @@ -0,0 +1,10 @@ +use MooseX::Declare; + +class IronMunger::Post { + + use MooseX::Types::DateTimeX qw(DateTime); + + has at => (isa => DateTime, is => 'rw', required => 1); +} + +1; diff --git a/load.pl b/load.pl new file mode 100644 index 0000000..293360d --- /dev/null +++ b/load.pl @@ -0,0 +1,11 @@ +use DateTime; + +use IO::All; + +use Text::CSV_XS; + +use Data::Dumper qw(Dumper); $Data::Dumper::Indent = 1; + +my $in = io('csv/my_Jess_Robinson.csv'); + +