in reply to Re: PAR::packer with Date::Manip gives error
in thread PAR::packer with Date::Manip gives error

Thanks for the reply.

I actually came to the same conclusion as you and explicitly added use Date::Manip::Lang::english; into my test program. This way, the PAR'ed up executable no longer reported the obscure message. Instead, it reports:

Use of uninitialized value $beg in string comparison (cmp) at Date/Man +ip/TZ.pm line 1035. Use of uninitialized value $end in string comparison (cmp) at Date/Man +ip/TZ.pm line 1037. Use of uninitialized value $beg in string comparison (cmp) at Date/Man +ip/TZ.pm line 1035. Use of uninitialized value $end in string comparison (cmp) at Date/Man +ip/TZ.pm line 1037. Use of uninitialized value $y in length at Date/Manip/Base.pm line 222 +3. Use of uninitialized value $y in concatenation (.) or string at Date/M +anip/Base.pm line 2224. Use of uninitialized value $m in length at Date/Manip/Base.pm line 222 +6. Use of uninitialized value $d in length at Date/Manip/Base.pm line 222 +7. Use of uninitialized value $h in length at Date/Manip/Base.pm line 222 +8. Use of uninitialized value $mn in length at Date/Manip/Base.pm line 22 +29. Use of uninitialized value $s in length at Date/Manip/Base.pm line 223 +0. Use of uninitialized value $m in concatenation (.) or string at Date/M +anip/Base.pm line 2231. Use of uninitialized value $d in concatenation (.) or string at Date/M +anip/Base.pm line 2231. Use of uninitialized value $h in concatenation (.) or string at Date/M +anip/Base.pm line 2231. Use of uninitialized value $mn in concatenation (.) or string at Date/ +Manip/Base.pm line 2231. Use of uninitialized value $s in concatenation (.) or string at Date/M +anip/Base.pm line 2231. Use of uninitialized value $beg in string comparison (cmp) at Date/Man +ip/TZ.pm line 1035. Use of uninitialized value $end in string comparison (cmp) at Date/Man +ip/TZ.pm line 1037. Use of uninitialized value $year in addition (+) at Date/Manip/TZ.pm l +ine 1038. Use of uninitialized value $beg in string comparison (cmp) at Date/Man +ip/TZ.pm line 1035. Use of uninitialized value $end in string comparison (cmp) at Date/Man +ip/TZ.pm line 1037. Use of uninitialized value $y in length at Date/Manip/Base.pm line 222 +3. Use of uninitialized value $y in concatenation (.) or string at Date/M +anip/Base.pm line 2224. Use of uninitialized value $m in length at Date/Manip/Base.pm line 222 +6. Use of uninitialized value $d in length at Date/Manip/Base.pm line 222 +7. Use of uninitialized value $h in length at Date/Manip/Base.pm line 222 +8. Use of uninitialized value $mn in length at Date/Manip/Base.pm line 22 +29. Use of uninitialized value $s in length at Date/Manip/Base.pm line 223 +0. Use of uninitialized value $m in concatenation (.) or string at Date/M +anip/Base.pm line 2231. Use of uninitialized value $d in concatenation (.) or string at Date/M +anip/Base.pm line 2231. Use of uninitialized value $h in concatenation (.) or string at Date/M +anip/Base.pm line 2231. Use of uninitialized value $mn in concatenation (.) or string at Date/ +Manip/Base.pm line 2231. Use of uninitialized value $s in concatenation (.) or string at Date/M +anip/Base.pm line 2231. Use of uninitialized value $beg in string comparison (cmp) at Date/Man +ip/TZ.pm line 1035. Use of uninitialized value $end in string comparison (cmp) at Date/Man +ip/TZ.pm line 1037. Use of uninitialized value $year in addition (+) at Date/Manip/TZ.pm l +ine 1038. Use of uninitialized value $f[1] in multiplication (*) at script/try.p +l line 20. Use of uninitialized value $f[2] in multiplication (*) at script/try.p +l line 21. Use of uninitialized value $f[3] in multiplication (*) at script/try.p +l line 22. Use of uninitialized value $f[4] in multiplication (*) at script/try.p +l line 23. Use of uninitialized value $f[5] in multiplication (*) at script/try.p +l line 24. Use of uninitialized value $f[6] in multiplication (*) at script/try.p +l line 25. Delta is 0 seconds
I have tracked it down to the Date::Manip::Date::date->parse method which is for some reason failing. Do you have any other suggestions?

Replies are listed 'Best First'.
Re^3: PAR::packer with Date::Manip gives error
by almut (Canon) on Jan 12, 2010 at 22:08 UTC

    It's a little tedious to track down why those variables are uninitialized, but I'd think it's because still other modules are missing from the PAR package....  The author seems to have gone from one extreme to the other: in earlier releases, there was only one big Date/Manip.pm file, while the current release comes with around 940 individual .pm files :)  Not all of them are being loaded in every case...

    When I run your script under strace (my way of dependency scanning), it reveals the following modules effectively being used:

    $ strace -eopen ./817045.pl 2>&1 | grep 'Date/Manip.*= [0-9]\+$' open("./Date/Manip/Lang/english.pm", O_RDONLY) = 6 open("./Date/Manip.pm", O_RDONLY) = 8 open("./Date/Manip/Date.pm", O_RDONLY) = 9 open("./Date/Manip/Obj.pm", O_RDONLY) = 10 open("./Date/Manip/Base.pm", O_RDONLY) = 11 open("./Date/Manip/Lang/index.pm", O_RDONLY) = 11 open("./Date/Manip/TZ.pm", O_RDONLY) = 11 open("./Date/Manip/Zones.pm", O_RDONLY) = 11 open("./Date/Manip/Delta.pm", O_RDONLY) = 8 open("./Date/Manip/Recur.pm", O_RDONLY) = 8 open("./Date/Manip/TZ/euberl00.pm", O_RDONLY) = 4 open("./Date/Manip/TZ/etgmt00.pm", O_RDONLY) = 4

    You probably need to make sure those are part of the PAR package.  The TZ/* ones may be different in your case, so you might want to run the above strace command yourself... (in case you're on Linux/Unix)

      That's exactly right. Here's what I had to add to my script to work:
      use Date::Manip::Lang::english; use Date::Manip::Lang::index; use Date::Manip::Date; use Date::Manip::Delta; use Date::Manip::Recur; use Date::Manip::Zones; use Date::Manip::Obj; use Date::Manip::TZ; use Date::Manip::Base; use Date::Manip::TZ::etgmt00; use Date::Manip::TZ::amchic00; Date_Init("tz=america/chicago");
      Note the Date_Init() call at the end of that sequence which guarantees that my timezone alligns with the pulled in modules.

      Thank you for your help!

Re^3: PAR::packer with Date::Manip gives error
by Khen1950fx (Canon) on Jan 12, 2010 at 22:01 UTC
    What version of perl and Date::Manip are you using?