Reply to topic
Invoking DateTime modules in to perl programming.
mahesh


Joined: 18 Jan 2006
Posts: 2
Location: india
Reply with quote
I downloaded DateTime and DateTime::Set modules from http://search.cpan.org/dist/ site.

I included into @INC array through my perl program using BEGIN.

But when i try to execute my program i am getting following error.

[irp-view7: perl]$ perl date-inc.plx
Can't locate loadable object for module DateTime in @INC (@INC contains: /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 . /users/mseeniva/perl/DateTime-0.30/lib/ /users/mseeniva/perl/DateTime-Set-0.25/lib) at /usr/perl5/5.00503/Carp.pm line 44
BEGIN failed--compilation aborted at /users/mseeniva/perl/DateTime-0.30/lib//DateTime.pm line 44.
BEGIN failed--compilation aborted at date-inc.plx line 7.
[irp-view7: perl]$


My program is:
-----------------



sub BEGIN
{
push @INC, "/users/mseeniva/perl/DateTime-0.30/lib/";
push @INC, "/users/mseeniva/perl/DateTime-Set-0.25/lib";
}

use DateTime;
use DateTime::Set;
my $start_dt = DateTime->new(year => 1998, month => 4, day => 7);
my $end_dt = DateTime->new(year => 1998, month => 7, day => 7);

my $weeks = 0;
for (my $dt = $start_dt->clone();
$dt <= $end_dt;
$dt->add(weeks => 1) ) {

$weeks++;
print "date : $dt \n";
}


----------------------------------------------------------------------------------------------------

If anybody knows the reason let me know.

Thanks,
-mahesh.
Invoking DateTime modules in to perl programming.
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic