diff -rc DateTime-LazyInit-0.10.old/lib/DateTime/LazyInit.pm DateTime-LazyInit-0.10.new/lib/DateTime/LazyInit.pm
*** DateTime-LazyInit-0.10.old/lib/DateTime/LazyInit.pm	2006-04-22 18:35:22.710440000 -0400
--- DateTime-LazyInit-0.10.new/lib/DateTime/LazyInit.pm	2006-04-22 18:35:21.862198000 -0400
***************
*** 15,23 ****
  	# We'll accept your grandmother if you pass her to us.
  	my %args = @_;
  
! 	return bless \%args, $class;
  }
  
  sub AUTOLOAD {
  
  	my $attr = $AUTOLOAD;
--- 15,126 ----
  	# We'll accept your grandmother if you pass her to us.
  	my %args = @_;
  
! 	return bless \%args, 'DateTime::LazyInit::Constructor_new';
  }
  
+ {
+ 	package DateTime::LazyInit::Constructor_new;
+ 	use vars qw/@ISA/;
+ 	@ISA = qw/DateTime::LazyInit/;
+ }
+ 
+ sub from_epoch {
+ 	my $class = shift;
+ 
+ 	# NO VALIDATION
+ 	# We'll accept your grandmother if you pass her to us.
+ 	my %args = @_;
+ 
+ 	return bless \%args, 'DateTime::LazyInit::Constructor_from_epoch';
+ }
+ 
+ {
+ 	package DateTime::LazyInit::Constructor_from_epoch;
+ 	use vars qw/@ISA/;
+ 	@ISA = qw/DateTime::LazyInit/;
+ }
+ 
+ sub now {
+ 	my $class = shift;
+ 
+ 	# NO VALIDATION
+ 	# We'll accept your grandmother if you pass her to us.
+ 	my %args = @_;
+ 
+ 	return bless \%args, 'DateTime::LazyInit::Constructor_now';
+ }
+ 
+ {
+ 	package DateTime::LazyInit::Constructor_now;
+ 	use vars qw/@ISA/;
+ 	@ISA = qw/DateTime::LazyInit/;
+ }
+ 
+ sub today {
+ 	my $class = shift;
+ 
+ 	# NO VALIDATION
+ 	# We'll accept your grandmother if you pass her to us.
+ 	my %args = @_;
+ 
+ 	return bless \%args, 'DateTime::LazyInit::Constructor_today';
+ }
+ 
+ {
+ 	package DateTime::LazyInit::Constructor_today;
+ 	use vars qw/@ISA/;
+ 	@ISA = qw/DateTime::LazyInit/;
+ }
+ 
+ sub from_object {
+ 	my $class = shift;
+ 
+ 	# NO VALIDATION
+ 	# We'll accept your grandmother if you pass her to us.
+ 	my %args = @_;
+ 
+ 	return bless \%args, 'DateTime::LazyInit::Constructor_from_object';
+ }
+ 
+ {
+ 	package DateTime::LazyInit::Constructor_from_object;
+ 	use vars qw/@ISA/;
+ 	@ISA = qw/DateTime::LazyInit/;
+ }
+ 
+ sub last_day_of_month {
+ 	my $class = shift;
+ 
+ 	# NO VALIDATION
+ 	# We'll accept your grandmother if you pass her to us.
+ 	my %args = @_;
+ 
+ 	return bless \%args, 'DateTime::LazyInit::Constructor_last_day_of_month';
+ }
+ 
+ {
+ 	package DateTime::LazyInit::Constructor_last_day_of_month;
+ 	use vars qw/@ISA/;
+ 	@ISA = qw/DateTime::LazyInit/;
+ }
+ 
+ sub from_day_of_year {
+ 	my $class = shift;
+ 
+ 	# NO VALIDATION
+ 	# We'll accept your grandmother if you pass her to us.
+ 	my %args = @_;
+ 
+ 	return bless \%args, 'DateTime::LazyInit::Constructor_from_day_of_year';
+ }
+ 
+ {
+ 	package DateTime::LazyInit::Constructor_from_day_of_year;
+ 	use vars qw/@ISA/;
+ 	@ISA = qw/DateTime::LazyInit/;
+ }
+ 
+ 
  sub AUTOLOAD {
  
  	my $attr = $AUTOLOAD;
diff -rc DateTime-LazyInit-0.10.old/t/DateTime-LazyInit.t DateTime-LazyInit-0.10.new/t/DateTime-LazyInit.t
*** DateTime-LazyInit-0.10.old/t/DateTime-LazyInit.t	2006-04-22 18:36:04.364021000 -0400
--- DateTime-LazyInit-0.10.new/t/DateTime-LazyInit.t	2006-04-22 18:36:03.626626000 -0400
***************
*** 20,26 ****
  # Insert your test code below, the Test::More module is use()ed here so read
  # its man page ( perldoc Test::More ) for help writing this test script.
  
! my $dtli = DateTime::LazyInit->new( year=>2005, month=>7, day=>25 );
  
  isa_ok($dtli => 'DateTime::LazyInit');
  
--- 20,26 ----
  # Insert your test code below, the Test::More module is use()ed here so read
  # its man page ( perldoc Test::More ) for help writing this test script.
  
! my $dtli = DateTime::LazyInit->new( year=>2006, month=>7, day=>25 );
  
  isa_ok($dtli => 'DateTime::LazyInit');
  
***************
*** 129,150 ****
--- 129,217 ----
  
  
  
+ #----------------------------------------------------------------------
+ # Test other constructors
+ #----------------------------------------------------------------------
+ 
+ #
+ # from_epoch
+ #
+ my $time = time;
+ my $dtli_fe = DateTime::LazyInit->from_epoch(epoch => $time);
+ isa_ok($dtli_fe => 'DateTime::LazyInit');
+ 
+ is($dtli_fe->epoch, $time, "epoch accessor from from_epoch()");
+ 
+ # previous call to epoch() should have inflated
+ isa_ok($dtli_fe, 'DateTime');
+ 
  
+ #
+ # now
+ #
+ my $dtli_n = DateTime::LazyInit->now;
+ isa_ok($dtli_n => 'DateTime::LazyInit');
  
+ my $now_time = $dtli_n->epoch;
+ ok( ($now_time - $time) < 5, "epoch accessor from now()");
  
+ # previous call to epoch() should have inflated
+ isa_ok($dtli_n, 'DateTime');
  
+ #
+ # today
+ #
+ my $today = DateTime->today;
+ my $dtli_t = DateTime::LazyInit->today;
+ isa_ok($dtli_t => 'DateTime::LazyInit');
  
+ is( $dtli_t->datetime, $today->datetime, "datetime accessor from today()");
  
+ # previous call to datetime() should have inflated
+ isa_ok($dtli_t, 'DateTime');
  
+ #
+ # from_object
+ #
+ my $dtli_fo = DateTime::LazyInit->from_object( object => $today );
+ isa_ok($dtli_fo, 'DateTime::LazyInit');
  
+ is( $dtli_fo->datetime, $today->datetime,
+     "datetime accessor from from_object()");
  
+ # previous call to datetime() should have inflated
+ isa_ok($dtli_fo, 'DateTime');
  
+ #
+ # last_day_of_month
+ #
+ my $dtli_ldom = DateTime::LazyInit->last_day_of_month(
+     year => 2006, month => 1);
  
+ isa_ok($dtli_ldom, 'DateTime::LazyInit');
  
+ my $last_jan_day = DateTime->new(year => 2006, month => 1, day => 31);
+ $last_jan_day = $last_jan_day->truncate( to => 'day');
  
+ is( $dtli_ldom->datetime, $last_jan_day->datetime,
+     "datetime accessor from last_day_of_month()" );
  
+ # previous call to datetime() should have inflated
+ isa_ok($dtli_ldom, 'DateTime');
  
+ #
+ # from_day_of_year
+ #
+ my $dtli_fdoy = DateTime::LazyInit->from_day_of_year(
+     year => 2006, day_of_year => 1);
+ isa_ok($dtli_fdoy, 'DateTime::LazyInit');
  
+ my $first_jan_day = DateTime->new(year => 2006, month => 1, day => 1);
+ $first_jan_day = $first_jan_day->truncate( to => 'day' );
  
+ is($dtli_fdoy->datetime, $first_jan_day->datetime,
+     "datetime accessor from first_day_of_year()" );
  
+ # previous call to datetime() should have inflated
+ isa_ok($dtli_fdoy, 'DateTime');
  
