Reputation: 3152
When I run the following command
D:\05_project>perl xml_export.pl xml_20190626.xml
it produces xml-files from a MariaDB. It works very well the last 6 month. I used Perl version 5.28 on Windows 7/64bit.
Last week I removed Perl 5.28 and installed Perl 5.30. Many Perl-scripts works without causing problems but the xml_export.pl
breaks after starting. The first what happenend is to give a system error:
Then the following message was put on the terminal:
Can't load 'C:\PerlLib\lib\perl5/MSWin32-x64-multi-thread/auto/Date/Calc/XS/XS.xs.dll'
for module Date::Calc::XS: load_file:
The specified module could not befound at
C:/Program2/Strawberry/perl/lib/DynaLoader.pm line 193.
at C:\PerlLib\lib\perl5/Date/Calc.pm line 26.
Compilation failed in require at C:\PerlLib\lib\perl5/Date/Calc.pm line 26.
BEGIN failed--compilation aborted at C:\PerlLib\lib\perl5/Date/Calc.pm line 43.
Compilation failed in require at xml_export.pl line 67.
BEGIN failed--compilation aborted at xml_export.pl line 67.
I'm wondering what happened and how can I solve this problem. The package Date::Calc is installed. Perl is installed in drive C and I run perl scripts from drive c and d. As mentioned, I had no problem until I installed the new version of Perl. I reinstalled Perl 5.30 but the problem persists. Any idea?
Update 1:
If I comment out the package Date::Calc
in xml_export.pl
# -- date computations # line 66
# use Date::Calc qw(:all); # line 67
The script works now. So, the question remains why it does not work when adding this package and why this strange system error (missing perl528.dll) is shown.
Upvotes: 0
Views: 1100
Reputation: 241738
Date::Calc has an XS component Date::Calc::XS, i.e. it needs to compile some C code. When you upgrade Perl, you need to recompile all the XS modules so they work with the new Perl version. The installed package is linked against a library that doesn't exist anymore (which is what the System Error window tells you).
Reinstalling Date::Calc should fix the issue, but make sure all other XS modules are updated, too.
Upvotes: 3