perl DateCalc & Calc issue

 
cyclops_1
Occasional Advisor

perl DateCalc & Calc issue

Hi,
I have some issue with perl modules,i have perl 5.8.3 & installed DateCalc 3.2 & Calc 5.4 module, but when i execute my primary package on apache server ,log shows some message as follows

Subroutine Date::Calc::Language redefined at /opt/perl/lib/site_perl/5.8.3/IA64.ARCHREV_0-thread-multi/Date/Calc.pm line 103.
Subroutine Date::Calc::Languages redefined at /opt/perl/lib/site_perl/5.8.3/IA64.ARCHREV_0-thread-multi/Date/Calc.pm line 103.
Subroutine Date::Calc::ISO_LC redefined at /opt/perl/lib/site_perl/5.8.3/IA64.ARCHREV_0-thread-multi/Date/Calc.pm line 103.
Subroutine Date::Calc::ISO_UC redefined at /opt/perl/lib/site_perl/5.8.3/IA64.ARCHREV_0-thread-multi/Date/Calc.pm line 103.
Subroutine Date::Calc::Version redefined at /opt/perl/lib/site_perl/5.8.3/IA64.ARCHREV_0-thread-multi/Date/Calc.pm line 103.
Use of uninitialized value in concatenation (.) or string at Pace.pm line 98.
Undefined subroutine &Date::DateCalc::check_date called at Pace.pm line 543.

no element found at line 1, column 0, byte 0 at /opt/perl/lib/site_perl/5.8.3/IA64.ARCHREV_0-thread-multi/XML/Parser.pm line 187

Details
HPUX 11iv2,rx4640,2CPU,8GB
11 REPLIES 11
James R. Ferguson
Acclaimed Contributor

Re: perl DateCalc & Calc issue

Hi:

The 'Date::Calc' module documentation notes that:

/* begin quote */

"In the current implementation of this package, the selected language is stored in a global variable.

Therefore, when you are using a threaded Perl, this may cause undesired side effects (of one thread always selecting the language for ALL OTHER threads as well).

/* end quote */

Hence, I believe that that describes the first set of messages you report.

For the remainder, you need to examine things further.

Regards!

...JRF...
cyclops_1
Occasional Advisor

Re: perl DateCalc & Calc issue

Hi james,
Actually i am new to perl,what u brought to my attention is acceptable but what shud i do to resolve the issue..??
cyclops_1
Occasional Advisor

Re: perl DateCalc & Calc issue

Hi James,
Eagerly waiting for your help
James R. Ferguson
Acclaimed Contributor

Re: perl DateCalc & Calc issue

Hi (again) Cyclops:

You need to look (at least) at your 'Pace.pm' module around line 98 and also lie 543. The "uninitialized value" is a warning, but the undefined subroutine constitutes an error.

&Date::DateCalc::check_date

...should be:

&Date::Calc::check_date( ...

...or:

Date::DateCalc::check_date( ...

Regards!

...JRF...


cyclops_1
Occasional Advisor

Re: perl DateCalc & Calc issue

Hi james,
Sorry for the delay, I tried the things as u suggested but still its showing the same error...
I still couldnt figure it out what is the error..also i think check_date function is of Calc.pm package,then why its showing error with DateCal.pm package..

waiting for ur reply.
James R. Ferguson
Acclaimed Contributor

Re: perl DateCalc & Calc issue

Hi (again):

> i think check_date function is of Calc.pm package,then why its showing error with DateCal.pm package..

I don't know what module 'Calc.pm' is. In your initial post you mentioned "DateCalc 3.2 & Calc 5.4" which is interesting since the 'Date::Calc' module's current version is in fact 5.4. I can only presume that 'Calc.pm' is something indigenous to your local installation.

My previous post may have confused things. I _should have_ written the following:

You need to look (at least) at your 'Pace.pm' module around line 98 and also lie 543. The "uninitialized value" is a warning, but the undefined subroutine constitutes an error.

&Date::DateCalc::check_date

...should be:

&Date::Calc::check_date( ...

...or:

Date::Calc::check_date( ...

Regards!

...JRF...
cyclops_1
Occasional Advisor

Re: perl DateCalc & Calc issue

Hi James,
i tried to look into Pace.pm package i didnt got any clue.As i said before i am new to perl , so your help is very much expected
i still cudnt figure it out.
cyclops_1
Occasional Advisor

Re: perl DateCalc & Calc issue

hi james,
Can u please tell me what are the valid versions of DateCalc & Calc modules for perl 5.8.3

waiting for ur reply.
cyclops_1
Occasional Advisor

Re: perl DateCalc & Calc issue

Hi ,
I tried to debug my perl file, i found the following errors
may be some problem with DateCalc module's month_name_tab function.

Please help me out.

DB<13>
Pace::getDateLabel(Pace.pm:338): my $startMon=substr(month_name_tab(substr($_[0],4,2)),0,3);
DB<13>
Undefined subroutine &Pace::month_name_tab called at Pace.pm line 338.
Pace::getDateLabel(20090706,20090706) called at /utilities/intranet/apache/cgi-bin/pace/plotfsusage.pl line 148
main::initialise() called at /utilities/intranet/apache/cgi-bin/pace/plotfsusage.pl line 120
main::main() called at /utilities/intranet/apache/cgi-bin/pace/plotfsusage.pl line 257
Debugged program terminated. Use q to quit or R to restart,
use O inhibit_exit to avoid stopping after program termination,
h q, h R or h O to get additional info.