<?xml version="1.0" encoding="windows-1252"?>
<node id="853788" title="problem with Archive::Zip" created="2010-08-09 07:55:18" updated="2010-08-09 07:55:18">
<type id="115">
perlquestion</type>
<author id="505086">
fionbarr</author>
<data>
<field name="doctext">
I am trying: 
&lt;code&gt;
  my $zip = Archive::Zip-&gt;new();
  $zip-&gt;addFile($renamed_file)-&gt;desiredCompressionLevel(0);    
  if( $zip-&gt;writeToFileNamed($zip_filename) != AZ_OK ) {     print "write error...$!"; }
      print "Added $renamed_file to $zip_filename\n";
}
&lt;/code&gt;
and getting: 
&lt;code&gt;
Can't call method "desiredCompressionLevel" on an undefined value at /home/fds/lang/perl/fdsPerl-20100809/lib/site_perl/5.12.1/Archive/Zip/Archive.pm line 249.
 at /home/fds/lang/perl/fdsPerl-20100809/lib/site_perl/5.12.1/Archive/Zip/Archive.pm line 249
        Archive::Zip::Archive::addFile('Archive::Zip::Archive=HASH(0x149ff318)', 'vm.don') called at ve.pl line 75
&lt;/code&gt;

</field>
</data>
</node>
