Changeset 2053

Show
Ignore:
Timestamp:
10/26/06 02:53:38
Author:
miyagawa
Message:

this be 0.02. rename the modules

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • DateTime-Span-Birthdate/trunk/Changes

    r2049 r2053  
    1 Revision history for Perl extension DateTime::Span::Birth 
     1Revision history for Perl extension DateTime::Span::Birthdate 
     2 
     3  0.02  Thu Oct 26 02:52:44 JST 2006 
     4        - Make it a subclass of DateTime::Span actually 
     5        - renamed the module to ::Birthdate per Dave Rolsky 
    26 
    37  0.01  Thu Oct 26 00:08:56 2006 
  • DateTime-Span-Birthdate/trunk/MANIFEST

    r2049 r2053  
    1616inc/Test/Builder/Module.pm 
    1717inc/Test/More.pm 
    18 lib/DateTime/Span/Birth.pm 
     18lib/DateTime/Span/Birthdate.pm 
    1919Makefile.PL 
    2020MANIFEST                        This list of files 
  • DateTime-Span-Birthdate/trunk/Makefile.PL

    r2049 r2053  
    11use inc::Module::Install; 
    2 name 'DateTime-Span-Birth'; 
    3 all_from 'lib/DateTime/Span/Birth.pm'; 
     2name 'DateTime-Span-Birthdate'; 
     3all_from 'lib/DateTime/Span/Birthdate.pm'; 
    44 
    55requires 'DateTime'; 
  • DateTime-Span-Birthdate/trunk/README

    r2049 r2053  
    1 This is Perl module DateTime::Span::Birth
     1This is Perl module DateTime::Span::Birthdate
    22 
    33INSTALLATION 
    44 
    5 DateTime::Span::Birth installation is straightforward. If your CPAN shell is set up, 
     5DateTime::Span::Birthdate installation is straightforward. If your CPAN shell is set up, 
    66you should just be able to do 
    77 
    8     % cpan DateTime::Span::Birth 
     8    % cpan DateTime::Span::Birthdate 
    99 
    1010Download it, unpack it, then build it as per the usual: 
     
    1919DOCUMENTATION 
    2020 
    21 DateTime::Span::Birth documentation is available as in POD. So you can do: 
     21DateTime::Span::Birthdate documentation is available as in POD. So you can do: 
    2222 
    23     % perldoc DateTime::Span::Birth 
     23    % perldoc DateTime::Span::Birthdate 
    2424 
    2525to read the documentation online with your favorite pager. 
  • DateTime-Span-Birthdate/trunk/lib/DateTime/Span/Birthdate.pm

    r2052 r2053  
    1 package DateTime::Span::Birth
     1package DateTime::Span::Birthdate
    22 
    33use strict; 
    44use base qw( DateTime::Span ); 
    5 our $VERSION = '0.01'; 
     5our $VERSION = '0.02'; 
    66 
    77use Carp; 
     
    2121        @dates = $class->_from_age($p{age}, $p{on}); 
    2222    } else { 
    23         croak "DateTime::Span::Birth->new() requires from, to or age parameter"; 
     23        croak "DateTime::Span::Birthdate->new() requires from, to or age parameter"; 
    2424    } 
    2525 
     
    5252=head1 NAME 
    5353 
    54 DateTime::Span::Birth - Date span of birthdays for an age 
     54DateTime::Span::Birthdate - Date span of birthdays for an age 
    5555 
    5656=head1 SYNOPSIS 
    5757 
    58   use DateTime::Span::Birth
     58  use DateTime::Span::Birthdate
    5959 
    6060  # birthday span for people who are 28 years old today 
    61   my $span = DateTime::Span::Birth->new(age => 28); 
     61  my $span = DateTime::Span::Birthdate->new(age => 28); 
    6262 
    6363  # birthday span for 20 years old in $dt 
    64   my $span = DateTime::Span::Birth->new(age => 28, on => $dt); 
     64  my $span = DateTime::Span::Birthdate->new(age => 28, on => $dt); 
    6565 
    6666  # birthday span for teenagers 
    67   my $span = DateTime::Span::Birth->new(from => 13, to => 19); 
     67  my $span = DateTime::Span::Birthdate->new(from => 13, to => 19); 
    6868 
    6969=head1 DESCRIPTION 
    7070 
    71 DateTime::Span::Birth is a port of Date::Range::Birth module and works 
     71DateTime::Span::Birthdate is a port of Date::Range::Birth module and works 
    7272with DateTime::Span object. This module allows you to say "who is now 
    737328 years old, based on their birthday dates?" 
     
    8888=head1 SEE ALSO 
    8989 
    90 L<DateTime::Span>, L<Date::Range::Birth
     90L<DateTime::Span>, L<Date::Range::Birthdate
    9191 
    9292=cut 
  • DateTime-Span-Birthdate/trunk/t/00_compile.t

    r2049 r2053  
    22use Test::More tests => 1; 
    33 
    4 BEGIN { use_ok 'DateTime::Span::Birth' } 
     4BEGIN { use_ok 'DateTime::Span::Birthdate' } 
  • DateTime-Span-Birthdate/trunk/t/01_test.t

    r2049 r2053  
    11use strict; 
    22use t::TestBase; 
    3 use DateTime::Span::Birth
     3use DateTime::Span::Birthdate
    44plan tests => 2 * blocks; 
    55 
     
    77    my $block = shift; 
    88    my $span = $block->age 
    9         ? DateTime::Span::Birth->new(age => $block->age, on => $block->on) 
    10         : DateTime::Span::Birth->new(from => $block->from, to => $block->to, on => $block->on); 
     9        ? DateTime::Span::Birthdate->new(age => $block->age, on => $block->on) 
     10        : DateTime::Span::Birthdate->new(from => $block->from, to => $block->to, on => $block->on); 
    1111    is $span->start, $block->start; 
    1212    is $span->end, $block->end; 
  • DateTime-Span-Birthdate/trunk/t/02_errors.t

    r2049 r2053  
    11use strict; 
    22use t::TestBase; 
    3 use DateTime::Span::Birth
     3use DateTime::Span::Birthdate
    44 
    55plan tests => 1 * blocks; 
     
    99    eval { 
    1010        my $span = 
    11             $block->age  ? DateTime::Span::Birth->new(age => $block->age, on => $block->on) 
    12           : $block->from ? DateTime::Span::Birth->new(from => $block->from, to => $block->to, on => $block->on) 
    13           :                DateTime::Span::Birth->new(on => $block->on); 
     11            $block->age  ? DateTime::Span::Birthdate->new(age => $block->age, on => $block->on) 
     12          : $block->from ? DateTime::Span::Birthdate->new(from => $block->from, to => $block->to, on => $block->on) 
     13          :                DateTime::Span::Birthdate->new(on => $block->on); 
    1414    }; 
    1515    like $@, $block->expected;