From c2edbb5f2c62f24b96038671d0f3b699b12e05a6 Mon Sep 17 00:00:00 2001 From: Jed Lund Date: Wed, 19 Apr 2017 15:16:49 -0700 Subject: [PATCH] Updated the requirement for Params::CheckCompiler to Params::ValidationCompiler --- Changes | 4 ++ META.json | 6 +- META.yml | 6 +- Makefile.PL | 2 +- README.pod | 90 +++++++++++------------ lib/DateTimeX/Mashup/Shiras.pm | 104 +++++++++++++-------------- lib/DateTimeX/Mashup/Shiras/Types.pm | 2 +- 7 files changed, 109 insertions(+), 105 deletions(-) diff --git a/Changes b/Changes index ab291aa..5c7e692 100644 --- a/Changes +++ b/Changes @@ -10,6 +10,10 @@ Uses the change tracking convention * Another cool change +v0.36.14 2017-04-19 15:04:52-07:00 America/Los_Angeles + + ! Updated the requirement for Params::CheckCompiler to Params::ValidationCompiler + v0.36.12 2017-04-17 11:08:15-07:00 America/Los_Angeles ! Updated DateTime::Timezone requirements to 2.09 to pass (Thanks Ryan Voots) diff --git a/META.json b/META.json index 0e44b06..f5a88aa 100644 --- a/META.json +++ b/META.json @@ -67,11 +67,11 @@ "provides" : { "DateTimeX::Mashup::Shiras" : { "file" : "lib/DateTimeX/Mashup/Shiras.pm", - "version" : "v0.36.12" + "version" : "v0.36.14" }, "DateTimeX::Mashup::Shiras::Types" : { "file" : "lib/DateTimeX/Mashup/Shiras/Types.pm", - "version" : "v0.36.12" + "version" : "v0.36.14" } }, "release_status" : "stable", @@ -86,7 +86,7 @@ "web" : "https://github.com/jandrew/DateTimeX-Mashup-Shiras" } }, - "version" : "v0.36.12", + "version" : "v0.36.14", "x_authority" : "cpan:JANDREW" } diff --git a/META.yml b/META.yml index 7493bcb..4d90965 100644 --- a/META.yml +++ b/META.yml @@ -36,10 +36,10 @@ name: DateTimeX-Mashup-Shiras provides: DateTimeX::Mashup::Shiras: file: lib/DateTimeX/Mashup/Shiras.pm - version: v0.36.12 + version: v0.36.14 DateTimeX::Mashup::Shiras::Types: file: lib/DateTimeX/Mashup/Shiras/Types.pm - version: v0.36.12 + version: v0.36.14 requires: DateTime: '1.34' DateTime::Format::Epoch: '0.013' @@ -60,5 +60,5 @@ resources: bugtracker: https://github.com/jandrew/DateTimeX-Mashup-Shiras/issues homepage: https://github.com/jandrew/DateTimeX-Mashup-Shiras repository: https://github.com/jandrew/DateTimeX-Mashup-Shiras.git -version: v0.36.12 +version: v0.36.14 x_authority: cpan:JANDREW diff --git a/Makefile.PL b/Makefile.PL index a94b56f..d6694c9 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -56,7 +56,7 @@ my %WriteMakefileArgs = ( "YAML::Any" => 0, "version" => "0.77" }, - "VERSION" => "v0.36.12", + "VERSION" => "v0.36.14", "test" => { "TESTS" => "t/DateTimeX/Mashup/*.t t/DateTimeX/Mashup/Shiras/*.t" } diff --git a/README.pod b/README.pod index b031846..e562017 100644 --- a/README.pod +++ b/README.pod @@ -33,7 +33,7 @@ DateTimeX::Mashup::Shiras - A Moose role with date attributes =end html =head1 SYNOPSIS - + package MyPackage; use Moose; with 'DateTimeX::Mashup::Shiras' =>{ @@ -45,7 +45,7 @@ DateTimeX::Mashup::Shiras - A Moose role with date attributes __PACKAGE__->meta->make_immutable; #!env perl - my $firstinst = MyPackage->new( + my $firstinst = MyPackage->new( 'start_date' => '8/26/00', ); print $firstinst->get_start_date->format_cldr( "yyyy-MMMM-d" ) . "\n"; @@ -57,7 +57,7 @@ DateTimeX::Mashup::Shiras - A Moose role with date attributes print $firstinst->set_start_date( 36764.54167 ) . "\n"; print $firstinst->set_start_date( 0 ) . "\n"; print $firstinst->set_start_date( 60 ) . "\n"; - + ####################################### # Output of SYNOPSIS # 01:2000-August-26 @@ -70,46 +70,46 @@ DateTimeX::Mashup::Shiras - A Moose role with date attributes # 09:1970-01-01T00:00:00 # 09:1970-01-01T00:01:00 ####################################### - + =head1 DESCRIPTION -L - A small subspecies of +L - A small subspecies of Moose found in the western United States. -This is a Moose Role (L) that can add date based attributes -with some built in date converions to your Moose class. It also provides the +This is a Moose Role (L) that can add date based attributes +with some built in date converions to your Moose class. It also provides the traditional today, now, and weekend date calculation for the executed day. -The date conversion functionality comes from three different DateTime::Format -packages using L coersion. The three modules are; -L, L, and L. -The choice between them is managed by L as a type -coersion. As a general rule all input strings are parsed by ::Format::Flexible. All -numbers are parsed either by ::Format::Excel or by ::Format::Epoch. See the type -package for the details and corner cases. Since all the succesful date 'getters' -return DateTime objects, all the L methods can be applied directly. +The date conversion functionality comes from three different DateTime::Format +packages using L coersion. The three modules are; +L, L, and L. +The choice between them is managed by L as a type +coersion. As a general rule all input strings are parsed by ::Format::Flexible. All +numbers are parsed either by ::Format::Excel or by ::Format::Epoch. See the type +package for the details and corner cases. Since all the succesful date 'getters' +return DateTime objects, all the L methods can be applied directly. ex. $inst-Eget_today_wkend-Eymd( "/" ). =head2 Warnings -B<1.> Double digit years in some date text strings are problematic. This package assumes -that all double digit dates are no more than 20 years in the future of processing time +B<1.> Double digit years in some date text strings are problematic. This package assumes +that all double digit dates are no more than 20 years in the future of processing time (or more than 80 years before processing time) =head2 Parameters -This is a L role. The following parameters are passed as -keys to a hash_ref when calling B{ %args }>. +This is a L role. The following parameters are passed as +keys to a hash_ref when calling B{ %args }>. -=head3 date_attributes +=head3 date_attributes =over -B This is any array ref of the requested date attributes for the target -class consuming this role. To review the behavior of each named attribute review the +B This is any array ref of the requested date attributes for the target +class consuming this role. To review the behavior of each named attribute review the documentation for L<$named_attribute|/$named_attribute> below. -B if this key is not called the role will set up the following four attributes; +B if this key is not called the role will set up the following four attributes; [ qw( date_one date_two date_three date_four )] (Yes the count four is arbitrary) B any string that can be treated as an attribute name. @@ -118,19 +118,19 @@ B any string that can be treated as an attribute name. =head2 Attributes -Data passed to new when creating an instance of the consuming class. For modification of +Data passed to new when creating an instance of the consuming class. For modification of these attributes see the listed L of the instance. =head3 $named_attribute =over -B these are date attributes set to the type 'DateTimeDate'. +B these are date attributes set to the type 'DateTimeDate'. See the L Class for more details. B empty -B epoch numbers, DateTime definition HashRefs, Date Epoch ArrayRefs, and +B epoch numbers, DateTime definition HashRefs, Date Epoch ArrayRefs, and human readable strings =back @@ -143,23 +143,23 @@ B This holds the definition of the last day of the week B 'Friday' -B This will accept either day names, day abbreviations +B This will accept either day names, day abbreviations (no periods), or day integers (1 = Monday, 7 = Sunday ) =back =head2 Methods -Methods are used to manipulate both the public and private attributes of this role. -All attributes are set as 'ro' so other than ->new( ) these methods are the only way -to change or clear attributes. See L for generic implementation +Methods are used to manipulate both the public and private attributes of this role. +All attributes are set as 'ro' so other than ->new( ) these methods are the only way +to change or clear attributes. See L for generic implementation instructions. =head3 set_${named_attribute}( $date ) =over -B This is the way to change (or set) the various dates. +B This is the way to change (or set) the various dates. B Any $date data that can be coerced by L modules. @@ -172,8 +172,8 @@ B the equivalent DateTime object =over -B This is how you can call various dates and format their -output. example $self->get_today->ymd( "-" ). B 'today' and 'now' +B This is how you can call various dates and format their +output. example $self->get_today->ymd( "-" ). B 'today' and 'now' are special attribute cases and do not need to be defined to be retrieved. B a DateTime object @@ -184,8 +184,8 @@ B a DateTime object =over -B This is a way to call the equivalent start and end of the -week definded by the given 'week_end' attribute value. 'now' is not included +B This is a way to call the equivalent start and end of the +week definded by the given 'week_end' attribute value. 'now' is not included in this list. B a DateTime object @@ -196,14 +196,14 @@ B a DateTime object =head2 $ENV{Smart_Comments} -The module uses L if the '-ENV' option is set. The 'use' is -encapsulated in an if block triggered by an environmental variable to comfort -non-believers. Setting the variable $ENV{Smart_Comments} in a BEGIN block will -load and turn on smart comment reporting. There are three levels of 'Smartness' +The module uses L if the '-ENV' option is set. The 'use' is +encapsulated in an if block triggered by an environmental variable to comfort +non-believers. Setting the variable $ENV{Smart_Comments} in a BEGIN block will +load and turn on smart comment reporting. There are three levels of 'Smartness' available in this module '###', '####', and '#####'. =head1 BUILD / INSTALL from Source - + B<1.> Download a compressed file with this package code from your favorite source =over @@ -215,7 +215,7 @@ L L =back - + B<3.> Extract the code from the compressed file. =over @@ -223,7 +223,7 @@ B<3.> Extract the code from the compressed file. If you are using tar on a .tar.gz file this should work: tar -zxvf DateTimeX-Mashup-Shiras-v0.xx.tar.gz - + =back B<4.> Change (cd) into the extracted directory @@ -235,9 +235,9 @@ B<5.> Run the following (for Windows find what version of make was used to compile your perl) perl -V:make - + (then for Windows substitute the correct make function (s/make/dmake/g)? below) - + =back >perl Makefile.PL @@ -276,7 +276,7 @@ jandrew@cpan.org =head1 CONTRIBUTORS This is the (likely incomplete) list of people who have helped -make this distribution what it is, either via code contributions, +make this distribution what it is, either via code contributions, patches, bug reports, help with troubleshooting, etc. A huge 'thank you' to all of them. diff --git a/lib/DateTimeX/Mashup/Shiras.pm b/lib/DateTimeX/Mashup/Shiras.pm index 2c68503..eee843f 100644 --- a/lib/DateTimeX/Mashup/Shiras.pm +++ b/lib/DateTimeX/Mashup/Shiras.pm @@ -1,5 +1,5 @@ package DateTimeX::Mashup::Shiras; -use version 0.77; our $VERSION = version->declare("v0.36.12"); +use version 0.77; our $VERSION = version->declare("v0.36.14"); if( $ENV{ Smart_Comments } ){ use Smart::Comments -ENV; @@ -17,7 +17,7 @@ use lib '../../../lib', '../../lib'; use DateTimeX::Mashup::Shiras::Types v0.30 qw( WeekDay DateTimeDate - + WeekDayFromStr DateTimeDateFromHashRef DateTimeDateFromArrayRef @@ -34,7 +34,7 @@ my @datearray = qw( my @attribute_list; #########1 Import and set up the attributes to be built 6#########7#########8#########9 - + parameter date_attributes =>( isa => ArrayRef, predicate => '_has_date_attributes', @@ -70,7 +70,7 @@ role{ trigger => sub{ $_[3] = $dateattribute; _load_day( @_ ); }, ); } - + # build private attributes from the list for my $terminator ( '_wkstart', '_wkend' ) { for my $datename ( @attribute_list, 'today' ) { @@ -150,7 +150,7 @@ sub _find_weekend{ my $weekend = $self->_get_weekend; #### - Reached _find_weekend my $daystoweekend = - ( $weekday == $weekend ) ? + ( $weekday == $weekend ) ? 0 : ( $weekday > $weekend ) ? ( 7 - $weekday + $weekend ): @@ -159,7 +159,7 @@ sub _find_weekend{ ( $weekend == 7 ) ? 1 : $weekend + 1; my $daysfromweekstart = - ( $weekday == $weekstart ) ? + ( $weekday == $weekstart ) ? 0 : ( $weekday < $weekstart ) ? ( 7 - $weekstart + $weekday ): @@ -213,7 +213,7 @@ DateTimeX::Mashup::Shiras - A Moose role with date attributes =end html =head1 SYNOPSIS - + package MyPackage; use Moose; with 'DateTimeX::Mashup::Shiras' =>{ @@ -225,7 +225,7 @@ DateTimeX::Mashup::Shiras - A Moose role with date attributes __PACKAGE__->meta->make_immutable; #!env perl - my $firstinst = MyPackage->new( + my $firstinst = MyPackage->new( 'start_date' => '8/26/00', ); print $firstinst->get_start_date->format_cldr( "yyyy-MMMM-d" ) . "\n"; @@ -237,7 +237,7 @@ DateTimeX::Mashup::Shiras - A Moose role with date attributes print $firstinst->set_start_date( 36764.54167 ) . "\n"; print $firstinst->set_start_date( 0 ) . "\n"; print $firstinst->set_start_date( 60 ) . "\n"; - + ####################################### # Output of SYNOPSIS # 01:2000-August-26 @@ -250,46 +250,46 @@ DateTimeX::Mashup::Shiras - A Moose role with date attributes # 09:1970-01-01T00:00:00 # 09:1970-01-01T00:01:00 ####################################### - + =head1 DESCRIPTION -L - A small subspecies of +L - A small subspecies of Moose found in the western United States. -This is a Moose Role (L) that can add date based attributes -with some built in date converions to your Moose class. It also provides the +This is a Moose Role (L) that can add date based attributes +with some built in date converions to your Moose class. It also provides the traditional today, now, and weekend date calculation for the executed day. -The date conversion functionality comes from three different DateTime::Format -packages using L coersion. The three modules are; -L, L, and L. -The choice between them is managed by L as a type -coersion. As a general rule all input strings are parsed by ::Format::Flexible. All -numbers are parsed either by ::Format::Excel or by ::Format::Epoch. See the type -package for the details and corner cases. Since all the succesful date 'getters' -return DateTime objects, all the L methods can be applied directly. +The date conversion functionality comes from three different DateTime::Format +packages using L coersion. The three modules are; +L, L, and L. +The choice between them is managed by L as a type +coersion. As a general rule all input strings are parsed by ::Format::Flexible. All +numbers are parsed either by ::Format::Excel or by ::Format::Epoch. See the type +package for the details and corner cases. Since all the succesful date 'getters' +return DateTime objects, all the L methods can be applied directly. ex. $inst-Eget_today_wkend-Eymd( "/" ). =head2 Warnings -B<1.> Double digit years in some date text strings are problematic. This package assumes -that all double digit dates are no more than 20 years in the future of processing time +B<1.> Double digit years in some date text strings are problematic. This package assumes +that all double digit dates are no more than 20 years in the future of processing time (or more than 80 years before processing time) =head2 Parameters -This is a L role. The following parameters are passed as -keys to a hash_ref when calling B{ %args }>. +This is a L role. The following parameters are passed as +keys to a hash_ref when calling B{ %args }>. -=head3 date_attributes +=head3 date_attributes =over -B This is any array ref of the requested date attributes for the target -class consuming this role. To review the behavior of each named attribute review the +B This is any array ref of the requested date attributes for the target +class consuming this role. To review the behavior of each named attribute review the documentation for L<$named_attribute|/$named_attribute> below. -B if this key is not called the role will set up the following four attributes; +B if this key is not called the role will set up the following four attributes; [ qw( date_one date_two date_three date_four )] (Yes the count four is arbitrary) B any string that can be treated as an attribute name. @@ -298,19 +298,19 @@ B any string that can be treated as an attribute name. =head2 Attributes -Data passed to new when creating an instance of the consuming class. For modification of +Data passed to new when creating an instance of the consuming class. For modification of these attributes see the listed L of the instance. =head3 $named_attribute =over -B these are date attributes set to the type 'DateTimeDate'. +B these are date attributes set to the type 'DateTimeDate'. See the L Class for more details. B empty -B epoch numbers, DateTime definition HashRefs, Date Epoch ArrayRefs, and +B epoch numbers, DateTime definition HashRefs, Date Epoch ArrayRefs, and human readable strings =back @@ -323,23 +323,23 @@ B This holds the definition of the last day of the week B 'Friday' -B This will accept either day names, day abbreviations +B This will accept either day names, day abbreviations (no periods), or day integers (1 = Monday, 7 = Sunday ) =back =head2 Methods -Methods are used to manipulate both the public and private attributes of this role. -All attributes are set as 'ro' so other than ->new( ) these methods are the only way -to change or clear attributes. See L for generic implementation +Methods are used to manipulate both the public and private attributes of this role. +All attributes are set as 'ro' so other than ->new( ) these methods are the only way +to change or clear attributes. See L for generic implementation instructions. =head3 set_${named_attribute}( $date ) =over -B This is the way to change (or set) the various dates. +B This is the way to change (or set) the various dates. B Any $date data that can be coerced by L modules. @@ -352,8 +352,8 @@ B the equivalent DateTime object =over -B This is how you can call various dates and format their -output. example $self->get_today->ymd( "-" ). B 'today' and 'now' +B This is how you can call various dates and format their +output. example $self->get_today->ymd( "-" ). B 'today' and 'now' are special attribute cases and do not need to be defined to be retrieved. B a DateTime object @@ -364,8 +364,8 @@ B a DateTime object =over -B This is a way to call the equivalent start and end of the -week definded by the given 'week_end' attribute value. 'now' is not included +B This is a way to call the equivalent start and end of the +week definded by the given 'week_end' attribute value. 'now' is not included in this list. B a DateTime object @@ -376,14 +376,14 @@ B a DateTime object =head2 $ENV{Smart_Comments} -The module uses L if the '-ENV' option is set. The 'use' is -encapsulated in an if block triggered by an environmental variable to comfort -non-believers. Setting the variable $ENV{Smart_Comments} in a BEGIN block will -load and turn on smart comment reporting. There are three levels of 'Smartness' +The module uses L if the '-ENV' option is set. The 'use' is +encapsulated in an if block triggered by an environmental variable to comfort +non-believers. Setting the variable $ENV{Smart_Comments} in a BEGIN block will +load and turn on smart comment reporting. There are three levels of 'Smartness' available in this module '###', '####', and '#####'. =head1 BUILD / INSTALL from Source - + B<1.> Download a compressed file with this package code from your favorite source =over @@ -395,7 +395,7 @@ L L =back - + B<3.> Extract the code from the compressed file. =over @@ -403,7 +403,7 @@ B<3.> Extract the code from the compressed file. If you are using tar on a .tar.gz file this should work: tar -zxvf DateTimeX-Mashup-Shiras-v0.xx.tar.gz - + =back B<4.> Change (cd) into the extracted directory @@ -415,9 +415,9 @@ B<5.> Run the following (for Windows find what version of make was used to compile your perl) perl -V:make - + (then for Windows substitute the correct make function (s/make/dmake/g)? below) - + =back >perl Makefile.PL @@ -456,7 +456,7 @@ jandrew@cpan.org =head1 CONTRIBUTORS This is the (likely incomplete) list of people who have helped -make this distribution what it is, either via code contributions, +make this distribution what it is, either via code contributions, patches, bug reports, help with troubleshooting, etc. A huge 'thank you' to all of them. @@ -518,4 +518,4 @@ L =cut -#########1 Main POD ends 3#########4#########5#########6#########7#########8#########9 \ No newline at end of file +#########1 Main POD ends 3#########4#########5#########6#########7#########8#########9 diff --git a/lib/DateTimeX/Mashup/Shiras/Types.pm b/lib/DateTimeX/Mashup/Shiras/Types.pm index 617adb4..7032a52 100644 --- a/lib/DateTimeX/Mashup/Shiras/Types.pm +++ b/lib/DateTimeX/Mashup/Shiras/Types.pm @@ -1,5 +1,5 @@ package DateTimeX::Mashup::Shiras::Types; -use version; our $VERSION = version->declare("v0.36.12"); +use version; our $VERSION = version->declare("v0.36.14"); use strict; use warnings; use 5.010;