Subject: | -z fails for misplaced import |
problem: make_ppm -z fails, even after installing a command-line zip utility and win32 ports of tar and gzip (and modifying CPAN::Config.pm appropriately and EVEN adding a zip => '/path/to/zip.exe' pair ;-). The problem seemed to be with the unknown subroutine AZ_OK(), which is defined in Archive::Zip.
Some work with the perl debugger uncovered the source of the trouble. In PPM::Make::Utils.pm line 1414, this line appears:
require Archive::Zip; import Archive::Zip qw(:ERROR_CODES);
While this does indeed import Archive::Zip's error constants into the current package, the problem is that AZ_OK() is used in the Archive::Zip package. Bummer.
Fix: Since I am a simple cave-boy, I fixed this error on my system simply by using the fully qualified package name for the constant, Archive::Zip::AZ_OK() where AZ_OK() appears in PPM::Make.pm. This fixed the problem for me.
Also note that a good place to find win32 native TAR.EXE and GZIP.EXE is http://unxutils.sourceforge.net/. The utilities in this package do not depend on cygwin's DLL at all. Another possible source of unix utilities is Microsoft's own Unix Services for Windows, in which they distribute ActiveState's ActivePerl.
Hope this helps. make_ppm is a positive godsend for me. Thanks.