This problem also wasted a day of my time, because I am a very occasional user of perl. I hope to save someone else the trouble.

This line failed on Win32 with the error quoted above:

$zip->addFile("$workPath\\shared\\base.dll", "$packageName/base.dll") or die "$! add file failed \n";

The actual problem was the $workPath was wrong, making base.dll unavailable, but the 'or die' which I added to debug, didn't catch the missing file error. Frankly, once I followed the exact suggestion to use -e -r -f to check the filespec, the root cause was instantly revealed. The following revealed the error:

 if (( -f $$workPath\\shared\\base.dll) && ( -r $workPath\\shared\\base.dll)) { print "good\n";}else{ die " blah blah blah\n";}

In reply to Re^2: problem with Archive::Zip by jpfisher
in thread problem with Archive::Zip by fionbarr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.