/usr/local/share/man/man3
NameSizeModeActions
App::Prove.3pm105080444editdlrm
App::Prove::State.3pm60050444editdlrm
App::Prove::State::Result.3pm56190444editdlrm
App::Prove::State::Result::Test.3pm50510444editdlrm
AppConfig.3pm352890444editdlrm
AppConfig::Args.3pm79920444editdlrm
AppConfig::CGI.3pm66090444editdlrm
AppConfig::File.3pm126140444editdlrm
AppConfig::Getopt.3pm74440444editdlrm
AppConfig::State.3pm249720444editdlrm
AppConfig::Sys.3pm66950444editdlrm
Archive::Tar.3pm440610444editdlrm
Archive::Tar::File.3pm110830444editdlrm
Archive::Zip.3pm699850444editdlrm
Archive::Zip::FAQ.3pm184370444editdlrm
Archive::Zip::MemberRead.3pm67340444editdlrm
Archive::Zip::Tree.3pm28750444editdlrm
B::COW.3pm51630444editdlrm
Canary::Stability.3pm37270444editdlrm
CDB_File.3pm143180444editdlrm
common::sense.3pm00444editdlrm
Compress::Raw::Bzip2.3pm134630444editdlrm
Compress::Raw::Zlib.3pm420820444editdlrm
Compress::Zlib.3pm387190444editdlrm
CPAN::Meta.3pm159230444editdlrm
CPAN::Meta::Converter.3pm65940444editdlrm
CPAN::Meta::Feature.3pm43220444editdlrm
CPAN::Meta::History.3pm78550444editdlrm
CPAN::Meta::History::Meta_1_0.3pm99730444editdlrm
CPAN::Meta::History::Meta_1_1.3pm124100444editdlrm
CPAN::Meta::History::Meta_1_2.3pm222240444editdlrm
CPAN::Meta::History::Meta_1_3.3pm239740444editdlrm
CPAN::Meta::History::Meta_1_4.3pm245650444editdlrm
CPAN::Meta::Merge.3pm52850444editdlrm
CPAN::Meta::Prereqs.3pm73800444editdlrm
CPAN::Meta::Requirements.3pm123080444editdlrm
CPAN::Meta::Spec.3pm455920444editdlrm
CPAN::Meta::Validator.3pm42150444editdlrm
CPAN::Meta::YAML.3pm42300444editdlrm
Crypt::OpenSSL::Random.3pm56340444editdlrm
Curses.3pm375800444editdlrm
Curses::UI.3pm156190444editdlrm
Curses::UI::Buttonbox.3pm89080444editdlrm
Curses::UI::Calendar.3pm82030444editdlrm
Curses::UI::Checkbox.3pm65090444editdlrm
Curses::UI::Color.3pm59030444editdlrm
Curses::UI::Common.3pm64980444editdlrm
Curses::UI::Container.3pm90410444editdlrm
Curses::UI::Dialog::Basic.3pm52130444editdlrm
Curses::UI::Dialog::Calendar.3pm47610444editdlrm
Curses::UI::Dialog::Dirbrowser.3pm53690444editdlrm
Curses::UI::Dialog::Error.3pm43070444editdlrm
Curses::UI::Dialog::Filebrowser.3pm68890444editdlrm
Curses::UI::Dialog::Progress.3pm57740444editdlrm
Curses::UI::Dialog::Question.3pm52770444editdlrm
Curses::UI::Dialog::Status.3pm47650444editdlrm
Curses::UI::Label.3pm73330444editdlrm
Curses::UI::Listbox.3pm119880444editdlrm
Curses::UI::Menubar.3pm81100444editdlrm
Curses::UI::Notebook.3pm91400444editdlrm
Curses::UI::PasswordEntry.3pm37430444editdlrm
Curses::UI::Popupmenu.3pm74310444editdlrm
Curses::UI::Progressbar.3pm58910444editdlrm
Curses::UI::Radiobuttonbox.3pm40690444editdlrm
Curses::UI::Searchable.3pm66680444editdlrm
Curses::UI::TextEditor.3pm141710444editdlrm
Curses::UI::TextEntry.3pm36230444editdlrm
Curses::UI::TextViewer.3pm36700444editdlrm
Curses::UI::Tutorial.3pm85550444editdlrm
Curses::UI::Widget.3pm256750444editdlrm
Curses::UI::Window.3pm50840444editdlrm
Cwd.3pm71830444editdlrm
Date::Format.3pm72910444editdlrm
Date::Language.3pm38090444editdlrm
Date::Language::Bulgarian.3pm36750444editdlrm
Date::Language::Hungarian.3pm30910444editdlrm
Date::Parse.3pm54020444editdlrm
Digest::SHA.3pm257590444editdlrm
Expect.3pm602290444editdlrm
ExtUtils::CBuilder.3pm119230444editdlrm
ExtUtils::CBuilder::Platform::Windows.3pm31170444editdlrm
ExtUtils::Command.3pm59420444editdlrm
ExtUtils::Command::MM.3pm57230444editdlrm
ExtUtils::Liblist.3pm126790444editdlrm
ExtUtils::MakeMaker.3pm793570444editdlrm
ExtUtils::MakeMaker::Config.3pm25870444editdlrm
ExtUtils::MakeMaker::FAQ.3pm268290444editdlrm
ExtUtils::MakeMaker::Locale.3pm111680444editdlrm
ExtUtils::MakeMaker::Tutorial.3pm83890444editdlrm
ExtUtils::Manifest.3pm119610444editdlrm
ExtUtils::Mkbootstrap.3pm34590444editdlrm
ExtUtils::Mksymlists.3pm66990444editdlrm
ExtUtils::MM.3pm28290444editdlrm
ExtUtils::MM_AIX.3pm30440444editdlrm
ExtUtils::MM_Any.3pm311290444editdlrm
ExtUtils::MM_BeOS.3pm27980444editdlrm
ExtUtils::MM_Cygwin.3pm35690444editdlrm
ExtUtils::MM_Darwin.3pm26880444editdlrm
ExtUtils::MM_DOS.3pm30210444editdlrm
ExtUtils::MM_MacOS.3pm29870444editdlrm
ExtUtils::MM_NW5.3pm32000444editdlrm
ExtUtils::MM_OS2.3pm28860444editdlrm
ExtUtils::MM_QNX.3pm29420444editdlrm
ExtUtils::MM_Unix.3pm214190444editdlrm
ExtUtils::MM_UWIN.3pm30510444editdlrm
ExtUtils::MM_VMS.3pm149000444editdlrm
ExtUtils::MM_VOS.3pm29260444editdlrm
ExtUtils::MM_Win32.3pm59190444editdlrm
ExtUtils::MM_Win95.3pm32760444editdlrm
ExtUtils::MY.3pm27640444editdlrm
ExtUtils::testlib.3pm26900444editdlrm
File::GlobMapper.3pm114470444editdlrm
File::HomeDir.3pm182120444editdlrm
File::HomeDir::Darwin.3pm32320444editdlrm
File::HomeDir::Darwin::Carbon.3pm35170444editdlrm
File::HomeDir::Darwin::Cocoa.3pm34460444editdlrm
File::HomeDir::Driver.3pm31010444editdlrm
File::HomeDir::FreeDesktop.3pm34870444editdlrm
File::HomeDir::MacOS9.3pm34990444editdlrm
File::HomeDir::Test.3pm35340444editdlrm
File::HomeDir::Unix.3pm36380444editdlrm
File::HomeDir::Windows.3pm48910444editdlrm
File::Path.3pm310300444editdlrm
File::Slurp.3pm236260444editdlrm
File::Spec.3pm137840444editdlrm
File::Spec::AmigaOS.3pm28260444editdlrm
File::Spec::Cygwin.3pm39570444editdlrm
File::Spec::Epoc.3pm32510444editdlrm
File::Spec::Functions.3pm37990444editdlrm
File::Spec::Mac.3pm186640444editdlrm
File::Spec::OS2.3pm31180444editdlrm
File::Spec::Unix.3pm98370444editdlrm
File::Spec::VMS.3pm63890444editdlrm
File::Spec::Win32.3pm64510444editdlrm
File::Temp.3pm367990444editdlrm
File::Which.3pm97460444editdlrm
Getopt::Long.3pm526470444editdlrm
HDB.3pm109470444editdlrm
HDB::CMDS.3pm188940444editdlrm
HDB::Encode.3pm78630444editdlrm
HDB::Object.3pm100570444editdlrm
HTML::AsSubs.3pm85860444editdlrm
HTML::Element.3pm707930444editdlrm
HTML::Element::traverse.3pm159840444editdlrm
HTML::Form.3pm281580444editdlrm
HTML::Parse.3pm82770444editdlrm
HTML::Tree.3pm99820444editdlrm
HTML::Tree::AboutObjects.3pm379180444editdlrm
HTML::Tree::AboutTrees.3pm585340444editdlrm
HTML::Tree::Scanning.3pm343850444editdlrm
HTML::TreeBuilder.3pm301380444editdlrm
HTTP::Tiny.3pm277090444editdlrm
IO::AtomicFile.3pm53810444editdlrm
IO::Compress::Base.3pm35060444editdlrm
IO::Compress::Bzip2.3pm232600444editdlrm
IO::Compress::Deflate.3pm267680444editdlrm
IO::Compress::FAQ.3pm267180444editdlrm
IO::Compress::Gzip.3pm344890444editdlrm
IO::Compress::RawDeflate.3pm271340444editdlrm
IO::Compress::Zip.3pm408700444editdlrm
IO::InnerFile.3pm60350444editdlrm
IO::Lines.3pm37830444editdlrm
IO::Pty.3pm85790444editdlrm
IO::Scalar.3pm106790444editdlrm
IO::ScalarArray.3pm105280444editdlrm
IO::Stringy.3pm40490444editdlrm
IO::Tty.3pm83480444editdlrm
IO::Tty::Constant.3pm100120444editdlrm
IO::Uncompress::AnyInflate.3pm328000444editdlrm
IO::Uncompress::AnyUncompress.3pm307670444editdlrm
IO::Uncompress::Base.3pm35180444editdlrm
IO::Uncompress::Bunzip2.3pm291710444editdlrm
IO::Uncompress::Gunzip.3pm317190444editdlrm
IO::Uncompress::Inflate.3pm299150444editdlrm
IO::Uncompress::RawInflate.3pm295630444editdlrm
IO::Uncompress::Unzip.3pm312790444editdlrm
IO::Wrap.3pm106640444editdlrm
IO::WrapTie.3pm149870444editdlrm
JSON::PP.3pm500800444editdlrm
JSON::PP::Boolean.3pm26670444editdlrm
JSON::Syck.3pm80940444editdlrm
JSON::XS.3pm890370444editdlrm
JSON::XS::Boolean.3pm28570444editdlrm
lib::core::only.3pm56470444editdlrm
local::lib.3pm313900444editdlrm
LWP.3pm285060444editdlrm
LWP::Authen::Ntlm.3pm74890444editdlrm
LWP::ConnCache.3pm99670444editdlrm
LWP::Debug.3pm56080444editdlrm
LWP::MemberMixin.3pm48210444editdlrm
LWP::Protocol.3pm83500444editdlrm
LWP::Protocol::https.3pm56840444editdlrm
LWP::RobotUA.3pm90220444editdlrm
LWP::Simple.3pm90160444editdlrm
LWP::UserAgent.3pm481560444editdlrm
lwpcook.3pm148380444editdlrm
lwptut.3pm324410444editdlrm
Module::Build.3pm445630444editdlrm
Module::Build::API.3pm892670444editdlrm
Module::Build::Authoring.3pm173630444editdlrm
Module::Build::Base.3pm51570444editdlrm
Module::Build::Bundling.3pm99990444editdlrm
Module::Build::Compat.3pm108850444editdlrm
Module::Build::ConfigData.3pm73880444editdlrm
Module::Build::Cookbook.3pm259460444editdlrm
Module::Build::Notes.3pm46900444editdlrm
Module::Build::Platform::aix.3pm44720444editdlrm
Module::Build::Platform::cygwin.3pm45050444editdlrm
Module::Build::Platform::darwin.3pm44910444editdlrm
Module::Build::Platform::Default.3pm44900444editdlrm
Module::Build::Platform::MacOS.3pm53980444editdlrm
Module::Build::Platform::os2.3pm44740444editdlrm
Module::Build::Platform::Unix.3pm44810444editdlrm
Module::Build::Platform::VMS.3pm78850444editdlrm
Module::Build::Platform::VOS.3pm44770444editdlrm
Module::Build::Platform::Windows.3pm45290444editdlrm
Module::Build::PPMMaker.3pm48860444editdlrm
Mozilla::CA.3pm35710444editdlrm
Net::CIDR::Lite.3pm95620444editdlrm
Net::Cmd.3pm115450444editdlrm
Net::Config.3pm81000444editdlrm
Net::Domain.3pm38350444editdlrm
Net::FTP.3pm273410444editdlrm
Net::FTP::dataconn.3pm39790444editdlrm
Net::HTTP.3pm163750444editdlrm
Net::HTTP::NB.3pm53940444editdlrm
Net::HTTPS.3pm54380444editdlrm
Net::IP.3pm276970444editdlrm
Net::libnetFAQ.3pm147460444editdlrm
Net::Netrc.3pm67290444editdlrm
Net::NNTP.3pm231930444editdlrm
Net::POP3.3pm122590444editdlrm
Net::SMTP.3pm188800444editdlrm
Net::SSLeay.3pm3493500444editdlrm
Net::SSLeay::Handle.3pm91270444editdlrm
Net::Time.3pm45240444editdlrm
ok.3pm28510444editdlrm
Parse::CPAN::Meta.3pm101870444editdlrm
POD2::DE::local::lib.3pm228790444editdlrm
POD2::PT_BR::local::lib.3pm227620444editdlrm
Socket.3pm340780444editdlrm
Sub::Identify.3pm50870444editdlrm
SUPER.3pm73940444editdlrm
Switch.3pm190140444editdlrm
TAP::Base.3pm34010444editdlrm
TAP::Formatter::Base.3pm62330444editdlrm
TAP::Formatter::Color.3pm37170444editdlrm
TAP::Formatter::Console.3pm27220444editdlrm
TAP::Formatter::Console::ParallelSession.3pm30650444editdlrm
TAP::Formatter::Console::Session.3pm28320444editdlrm
TAP::Formatter::File.3pm26930444editdlrm
TAP::Formatter::File::Session.3pm28470444editdlrm
TAP::Formatter::Session.3pm36030444editdlrm
TAP::Harness.3pm213000444editdlrm
TAP::Harness::Beyond.3pm191180444editdlrm
TAP::Harness::Env.3pm54670444editdlrm
TAP::Object.3pm44970444editdlrm
TAP::Parser.3pm422100444editdlrm
TAP::Parser::Aggregator.3pm80230444editdlrm
TAP::Parser::Grammar.3pm86470444editdlrm
TAP::Parser::Iterator.3pm49930444editdlrm
TAP::Parser::Iterator::Array.3pm37710444editdlrm
TAP::Parser::Iterator::Process.3pm46010444editdlrm
TAP::Parser::Iterator::Stream.3pm37120444editdlrm
TAP::Parser::IteratorFactory.3pm69040444editdlrm
TAP::Parser::Multiplexer.3pm46460444editdlrm
TAP::Parser::Result.3pm75120444editdlrm
TAP::Parser::Result::Bailout.3pm32930444editdlrm
TAP::Parser::Result::Comment.3pm31180444editdlrm
TAP::Parser::Result::Plan.3pm41730444editdlrm
TAP::Parser::Result::Pragma.3pm30730444editdlrm
TAP::Parser::Result::Test.3pm71140444editdlrm
TAP::Parser::Result::Unknown.3pm29730444editdlrm
TAP::Parser::Result::Version.3pm31540444editdlrm
TAP::Parser::Result::YAML.3pm30860444editdlrm
TAP::Parser::ResultFactory.3pm55230444editdlrm
TAP::Parser::Scheduler.3pm81130444editdlrm
TAP::Parser::Scheduler::Job.3pm43010444editdlrm
TAP::Parser::Scheduler::Spinner.3pm33460444editdlrm
TAP::Parser::Source.3pm81700444editdlrm
TAP::Parser::SourceHandler.3pm75590444editdlrm
TAP::Parser::SourceHandler::Executable.3pm52970444editdlrm
TAP::Parser::SourceHandler::File.3pm45670444editdlrm
TAP::Parser::SourceHandler::Handle.3pm44250444editdlrm
TAP::Parser::SourceHandler::Perl.3pm62620444editdlrm
TAP::Parser::SourceHandler::RawTAP.3pm44340444editdlrm
TAP::Parser::YAMLish::Reader.3pm39950444editdlrm
TAP::Parser::YAMLish::Writer.3pm48790444editdlrm
Template.3pm279090444editdlrm
Template::Base.3pm81490444editdlrm
Template::Config.3pm86870444editdlrm
Template::Constants.3pm78150444editdlrm
Template::Context.3pm266370444editdlrm
Template::Directive.3pm48210444editdlrm
Template::Document.3pm118290444editdlrm
Template::Exception.3pm67630444editdlrm
Template::FAQ.3pm145640444editdlrm
Template::Filters.3pm98170444editdlrm
Template::Grammar.3pm50390444editdlrm
Template::Iterator.3pm114130444editdlrm
Template::Manual.3pm63170444editdlrm
Template::Manual::Config.3pm795040444editdlrm
Template::Manual::Credits.3pm82460444editdlrm
Template::Manual::Directives.3pm772930444editdlrm
Template::Manual::Filters.3pm208100444editdlrm
Template::Manual::Internals.3pm234330444editdlrm
Template::Manual::Intro.3pm140920444editdlrm
Template::Manual::Plugins.3pm137800444editdlrm
Template::Manual::Syntax.3pm145490444editdlrm
Template::Manual::Variables.3pm331100444editdlrm
Template::Manual::Views.3pm259530444editdlrm
Template::Manual::VMethods.3pm281950444editdlrm
Template::Modules.3pm98270444editdlrm
Template::Namespace::Constants.3pm60020444editdlrm
Template::Parser.3pm99170444editdlrm
Template::Plugin.3pm109370444editdlrm
Template::Plugin::Assert.3pm54460444editdlrm
Template::Plugin::CGI.3pm61880444editdlrm
Template::Plugin::Datafile.3pm66010444editdlrm
Template::Plugin::Date.3pm95380444editdlrm
Template::Plugin::Directory.3pm119790444editdlrm
Template::Plugin::Dumper.3pm60780444editdlrm
Template::Plugin::File.3pm130090444editdlrm
Template::Plugin::Filter.3pm129360444editdlrm
Template::Plugin::Format.3pm48950444editdlrm
Template::Plugin::HTML.3pm78230444editdlrm
Template::Plugin::Image.3pm119500444editdlrm
Template::Plugin::Iterator.3pm50610444editdlrm
Template::Plugin::Math.3pm66230444editdlrm
Template::Plugin::Pod.3pm47840444editdlrm
Template::Plugin::Procedural.3pm56310444editdlrm
Template::Plugin::Scalar.3pm50320444editdlrm
Template::Plugin::String.3pm172630444editdlrm
Template::Plugin::Table.3pm111450444editdlrm
Template::Plugin::URL.3pm80800444editdlrm
Template::Plugin::View.3pm54790444editdlrm
Template::Plugin::Wrap.3pm64330444editdlrm
Template::Plugins.3pm97330444editdlrm
Template::Provider.3pm146780444editdlrm
Template::Service.3pm148130444editdlrm
Template::Stash.3pm119830444editdlrm
Template::Stash::Context.3pm71300444editdlrm
Template::Stash::XS.3pm66440444editdlrm
Template::Test.3pm155240444editdlrm
Template::Toolkit.3pm92270444editdlrm
Template::Tools.3pm50010444editdlrm
Template::Tools::tpage.3pm58060444editdlrm
Template::Tools::ttree.3pm165670444editdlrm
Template::Tutorial.3pm45660444editdlrm
Template::Tutorial::Datafile.3pm195390444editdlrm
Template::Tutorial::Web.3pm341180444editdlrm
Template::View.3pm126180444editdlrm
Template::VMethods.3pm46880444editdlrm
Term::ReadKey.3pm130290444editdlrm
Test2.3pm95560444editdlrm
Test2::API.3pm304240444editdlrm
Test2::API::Breakage.3pm49880444editdlrm
Test2::API::Context.3pm175740444editdlrm
Test2::API::Instance.3pm124040444editdlrm
Test2::API::Stack.3pm65680444editdlrm
Test2::Event.3pm91890444editdlrm
Test2::Event::Bail.3pm34700444editdlrm
Test2::Event::Diag.3pm33380444editdlrm
Test2::Event::Exception.3pm35200444editdlrm
Test2::Event::Generic.3pm76620444editdlrm
Test2::Event::Info.3pm42610444editdlrm
Test2::Event::Note.3pm33230444editdlrm
Test2::Event::Ok.3pm42550444editdlrm
Test2::Event::Plan.3pm39070444editdlrm
Test2::Event::Skip.3pm36650444editdlrm
Test2::Event::Subtest.3pm35730444editdlrm
Test2::Event::Waiting.3pm31070444editdlrm
Test2::Formatter.3pm52080444editdlrm
Test2::Formatter::TAP.3pm92550444editdlrm
Test2::Hub.3pm167550444editdlrm
Test2::Hub::Interceptor.3pm29370444editdlrm
Test2::Hub::Interceptor::Terminator.3pm29800444editdlrm
Test2::Hub::Subtest.3pm38030444editdlrm
Test2::IPC.3pm33240444editdlrm
Test2::IPC::Driver.3pm95120444editdlrm
Test2::IPC::Driver::Files.3pm38220444editdlrm
Test2::Transition.3pm184060444editdlrm
Test2::Util.3pm51230444editdlrm
Test2::Util::ExternalMeta.3pm55940444editdlrm
Test2::Util::HashBase.3pm74630444editdlrm
Test2::Util::Trace.3pm55770444editdlrm
Test::Builder.3pm269150444editdlrm
Test::Builder::Formatter.3pm36560444editdlrm
Test::Builder::IO::Scalar.3pm97400444editdlrm
Test::Builder::Module.3pm55670444editdlrm
Test::Builder::Tester.3pm115500444editdlrm
Test::Builder::Tester::Color.3pm31310444editdlrm
Test::Builder::TodoDiag.3pm31290444editdlrm
Test::Fatal.3pm93030444editdlrm
Test::HACKING.3pm92530444editdlrm
Test::Harness.3pm110280444editdlrm
Test::LeakTrace.3pm100220444editdlrm
Test::LeakTrace::JA.3pm123280444editdlrm
Test::LeakTrace::Script.3pm51400444editdlrm
Test::MockModule.3pm108180444editdlrm
Test::More.3pm432150444editdlrm
Test::More::UTF8.3pm36020444editdlrm
Test::RequiresInternet.3pm39440444editdlrm
Test::Simple.3pm91190444editdlrm
Test::Tester.3pm157810444editdlrm
Test::Tester::Capture.3pm29020444editdlrm
Test::Tester::CaptureRunner.3pm26730444editdlrm
Test::Tutorial.3pm242610444editdlrm
Test::use::ok.3pm38410444editdlrm
Test::Warnings.3pm142310444editdlrm
Text::Glob.3pm61060444editdlrm
Text::Template.3pm654990444editdlrm
Text::Template::Preprocess.3pm62700444editdlrm
Time::Zone.3pm34130444editdlrm
TimeDate.3pm23970444editdlrm
Try::Tiny.3pm203430444editdlrm
Types::Serialiser.3pm114730444editdlrm
Types::Serialiser::Error.3pm27050444editdlrm
version.3pm139370444editdlrm
version::Internals.3pm302870444editdlrm
WWW::Mechanize.3pm681960444editdlrm
WWW::Mechanize::Cookbook.3pm71590444editdlrm
WWW::Mechanize::Examples.3pm224900444editdlrm
WWW::Mechanize::FAQ.3pm243590444editdlrm
WWW::Mechanize::Image.3pm64900444editdlrm
WWW::Mechanize::Link.3pm65180444editdlrm
XML::NamespaceSupport.3pm130520444editdlrm
XML::Parser.3pm262960444editdlrm
XML::Parser::Expat.3pm267990444editdlrm
XML::Parser::Style::Debug.3pm44080444editdlrm
XML::Parser::Style::Objects.3pm48880444editdlrm
XML::Parser::Style::Stream.3pm59250444editdlrm
XML::Parser::Style::Subs.3pm48630444editdlrm
XML::Parser::Style::Tree.3pm55290444editdlrm
XML::SAX.3pm92290444editdlrm
XML::SAX::Base.3pm137040444editdlrm
XML::SAX::BuildSAXBase.3pm137000444editdlrm
XML::SAX::DocumentLocator.3pm52390444editdlrm
XML::SAX::Exception.3pm56220444editdlrm
XML::SAX::Expat.3pm64040444editdlrm
XML::SAX::Intro.3pm202200444editdlrm
XML::SAX::ParserFactory.3pm79190444editdlrm
XML::SAX::PurePerl.3pm61720444editdlrm
XML::SAX::PurePerl::Reader.3pm41030444editdlrm
XML::Simple.3pm655890444editdlrm
XML::Simple::FAQ.3pm272230444editdlrm
YAML.3pm299800444editdlrm
YAML::Any.3pm74870444editdlrm
YAML::Dumper.3pm47760444editdlrm
YAML::Dumper::Base.3pm46420444editdlrm
YAML::Error.3pm46810444editdlrm
YAML::Loader.3pm47660444editdlrm
YAML::Loader::Base.3pm46420444editdlrm
YAML::Marshall.3pm46400444editdlrm
YAML::Node.3pm67430444editdlrm
YAML::Syck.3pm108060444editdlrm
YAML::Tag.3pm44990444editdlrm
YAML::Types.3pm47160444editdlrm
Edit: /usr/local/share/man/man3/Archive::Zip.3pm (69985B)
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Archive::Zip 3" .TH Archive::Zip 3 "2016-08-11" "perl v5.16.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Archive::Zip \- Provide an interface to ZIP archive files. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& # Create a Zip file \& use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); \& my $zip = Archive::Zip\->new(); \& \& # Add a directory \& my $dir_member = $zip\->addDirectory( \*(Aqdirname/\*(Aq ); \& \& # Add a file from a string with compression \& my $string_member = $zip\->addString( \*(AqThis is a test\*(Aq, \*(AqstringMember.txt\*(Aq ); \& $string_member\->desiredCompressionMethod( COMPRESSION_DEFLATED ); \& \& # Add a file from disk \& my $file_member = $zip\->addFile( \*(Aqxyz.pl\*(Aq, \*(AqAnotherName.pl\*(Aq ); \& \& # Save the Zip file \& unless ( $zip\->writeToFileNamed(\*(AqsomeZip.zip\*(Aq) == AZ_OK ) { \& die \*(Aqwrite error\*(Aq; \& } \& \& # Read a Zip file \& my $somezip = Archive::Zip\->new(); \& unless ( $somezip\->read( \*(AqsomeZip.zip\*(Aq ) == AZ_OK ) { \& die \*(Aqread error\*(Aq; \& } \& \& # Change the compression type for a file in the Zip \& my $member = $somezip\->memberNamed( \*(AqstringMember.txt\*(Aq ); \& $member\->desiredCompressionMethod( COMPRESSION_STORED ); \& unless ( $zip\->writeToFileNamed( \*(AqsomeOtherZip.zip\*(Aq ) == AZ_OK ) { \& die \*(Aqwrite error\*(Aq; \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The Archive::Zip module allows a Perl program to create, manipulate, read, and write Zip archive files. .PP Zip archives can be created, or you can read from existing zip files. .PP Once created, they can be written to files, streams, or strings. Members can be added, removed, extracted, replaced, rearranged, and enumerated. They can also be renamed or have their dates, comments, or other attributes queried or modified. Their data can be compressed or uncompressed as needed. .PP Members can be created from members in existing Zip files, or from existing directories, files, or strings. .PP This module uses the Compress::Raw::Zlib library to read and write the compressed streams inside the files. .PP One can use Archive::Zip::MemberRead to read the zip file archive members as if they were files. .SS "File Naming" .IX Subsection "File Naming" Regardless of what your local file system uses for file naming, names in a Zip file are in Unix format (\fIforward\fR slashes (/) separating directory names, etc.). .PP \&\f(CW\*(C`Archive::Zip\*(C'\fR tries to be consistent with file naming conventions, and will translate back and forth between native and Zip file names. .PP However, it can't guess which format names are in. So two rules control what kind of file name you must pass various routines: .IP "Names of files are in local format." 4 .IX Item "Names of files are in local format." \&\f(CW\*(C`File::Spec\*(C'\fR and \f(CW\*(C`File::Basename\*(C'\fR are used for various file operations. When you're referring to a file on your system, use its file naming conventions. .IP "Names of archive members are in Unix format." 4 .IX Item "Names of archive members are in Unix format." This applies to every method that refers to an archive member, or provides a name for new archive members. The \f(CW\*(C`extract()\*(C'\fR methods that can take one or two names will convert from local to zip names if you call them with a single name. .SS "Archive::Zip Object Model" .IX Subsection "Archive::Zip Object Model" \fIOverview\fR .IX Subsection "Overview" .PP Archive::Zip::Archive objects are what you ordinarily deal with. These maintain the structure of a zip file, without necessarily holding data. When a zip is read from a disk file, the (possibly compressed) data still lives in the file, not in memory. Archive members hold information about the individual members, but not (usually) the actual member data. When the zip is written to a (different) file, the member data is compressed or copied as needed. It is possible to make archive members whose data is held in a string in memory, but this is not done when a zip file is read. Directory members don't have any data. .SS "Inheritance" .IX Subsection "Inheritance" .Vb 9 \& Exporter \& Archive::Zip Common base class, has defs. \& Archive::Zip::Archive A Zip archive. \& Archive::Zip::Member Abstract superclass for all members. \& Archive::Zip::StringMember Member made from a string \& Archive::Zip::FileMember Member made from an external file \& Archive::Zip::ZipFileMember Member that lives in a zip file \& Archive::Zip::NewFileMember Member whose data is in a file \& Archive::Zip::DirectoryMember Member that is a directory .Ve .SH "EXPORTS" .IX Header "EXPORTS" .IP ":CONSTANTS" 4 .IX Item ":CONSTANTS" Exports the following constants: .Sp \&\s-1FA_MSDOS FA_UNIX GPBF_ENCRYPTED_MASK GPBF_DEFLATING_COMPRESSION_MASK GPBF_HAS_DATA_DESCRIPTOR_MASK COMPRESSION_STORED COMPRESSION_DEFLATED IFA_TEXT_FILE_MASK IFA_TEXT_FILE IFA_BINARY_FILE COMPRESSION_LEVEL_NONE COMPRESSION_LEVEL_DEFAULT COMPRESSION_LEVEL_FASTEST COMPRESSION_LEVEL_BEST_COMPRESSION\s0 .IP ":MISC_CONSTANTS" 4 .IX Item ":MISC_CONSTANTS" Exports the following constants (only necessary for extending the module): .Sp \&\s-1FA_AMIGA FA_VAX_VMS FA_VM_CMS FA_ATARI_ST FA_OS2_HPFS FA_MACINTOSH FA_Z_SYSTEM FA_CPM FA_WINDOWS_NTFS GPBF_IMPLODING_8K_SLIDING_DICTIONARY_MASK GPBF_IMPLODING_3_SHANNON_FANO_TREES_MASK GPBF_IS_COMPRESSED_PATCHED_DATA_MASK COMPRESSION_SHRUNK DEFLATING_COMPRESSION_NORMAL DEFLATING_COMPRESSION_MAXIMUM DEFLATING_COMPRESSION_FAST DEFLATING_COMPRESSION_SUPER_FAST COMPRESSION_REDUCED_1 COMPRESSION_REDUCED_2 COMPRESSION_REDUCED_3 COMPRESSION_REDUCED_4 COMPRESSION_IMPLODED COMPRESSION_TOKENIZED COMPRESSION_DEFLATED_ENHANCED COMPRESSION_PKWARE_DATA_COMPRESSION_LIBRARY_IMPLODED\s0 .IP ":ERROR_CODES" 4 .IX Item ":ERROR_CODES" Explained below. Returned from most methods. .Sp \&\s-1AZ_OK AZ_STREAM_END AZ_ERROR AZ_FORMAT_ERROR AZ_IO_ERROR\s0 .SH "ERROR CODES" .IX Header "ERROR CODES" Many of the methods in Archive::Zip return error codes. These are implemented as inline subroutines, using the \f(CW\*(C`use constant\*(C'\fR pragma. They can be imported into your namespace using the \f(CW\*(C`:ERROR_CODES\*(C'\fR tag: .PP .Vb 1 \& use Archive::Zip qw( :ERROR_CODES ); \& \& ... \& \& unless ( $zip\->read( \*(Aqmyfile.zip\*(Aq ) == AZ_OK ) { \& die "whoops!"; \& } .Ve .IP "\s-1AZ_OK \\fIs0\fR\|(0)" 4 .IX Item "AZ_OK f(ISs0" Everything is fine. .IP "\s-1AZ_STREAM_END \\fIs0\fR\|(1)" 4 .IX Item "AZ_STREAM_END f(ISs0" The read stream (or central directory) ended normally. .IP "\s-1AZ_ERROR \\fIs0\fR\|(2)" 4 .IX Item "AZ_ERROR f(ISs0" There was some generic kind of error. .IP "\s-1AZ_FORMAT_ERROR \\fIs0\fR\|(3)" 4 .IX Item "AZ_FORMAT_ERROR f(ISs0" There is a format error in a \s-1ZIP\s0 file being read. .IP "\s-1AZ_IO_ERROR \\fIs0\fR\|(4)" 4 .IX Item "AZ_IO_ERROR f(ISs0" There was an \s-1IO\s0 error. .SS "Compression" .IX Subsection "Compression" Archive::Zip allows each member of a \s-1ZIP\s0 file to be compressed (using the Deflate algorithm) or uncompressed. .PP Other compression algorithms that some versions of \s-1ZIP\s0 have been able to produce are not supported. Each member has two compression methods: the one it's stored as (this is always \s-1COMPRESSION_STORED\s0 for string and external file members), and the one you desire for the member in the zip file. .PP These can be different, of course, so you can make a zip member that is not compressed out of one that is, and vice versa. .PP You can inquire about the current compression and set the desired compression method: .PP .Vb 2 \& my $member = $zip\->memberNamed( \*(Aqxyz.txt\*(Aq ); \& $member\->compressionMethod(); # return current compression \& \& # set to read uncompressed \& $member\->desiredCompressionMethod( COMPRESSION_STORED ); \& \& # set to read compressed \& $member\->desiredCompressionMethod( COMPRESSION_DEFLATED ); .Ve .PP There are two different compression methods: .IP "\s-1COMPRESSION_STORED\s0" 4 .IX Item "COMPRESSION_STORED" File is stored (no compression) .IP "\s-1COMPRESSION_DEFLATED\s0" 4 .IX Item "COMPRESSION_DEFLATED" File is Deflated .SS "Compression Levels" .IX Subsection "Compression Levels" If a member's desiredCompressionMethod is \s-1COMPRESSION_DEFLATED,\s0 you can choose different compression levels. This choice may affect the speed of compression and decompression, as well as the size of the compressed member data. .PP .Vb 1 \& $member\->desiredCompressionLevel( 9 ); .Ve .PP The levels given can be: .IP "\(bu" 4 0 or \s-1COMPRESSION_LEVEL_NONE\s0 .Sp This is the same as saying .Sp .Vb 1 \& $member\->desiredCompressionMethod( COMPRESSION_STORED ); .Ve .IP "\(bu" 4 1 .. 9 .Sp 1 gives the best speed and worst compression, and 9 gives the best compression and worst speed. .IP "\(bu" 4 \&\s-1COMPRESSION_LEVEL_FASTEST\s0 .Sp This is a synonym for level 1. .IP "\(bu" 4 \&\s-1COMPRESSION_LEVEL_BEST_COMPRESSION\s0 .Sp This is a synonym for level 9. .IP "\(bu" 4 \&\s-1COMPRESSION_LEVEL_DEFAULT\s0 .Sp This gives a good compromise between speed and compression, and is currently equivalent to 6 (this is in the zlib code). This is the level that will be used if not specified. .SH "Archive::Zip Methods" .IX Header "Archive::Zip Methods" The Archive::Zip class (and its invisible subclass Archive::Zip::Archive) implement generic zip file functionality. Creating a new Archive::Zip object actually makes an Archive::Zip::Archive object, but you don't have to worry about this unless you're subclassing. .SS "Constructor" .IX Subsection "Constructor" .IP "new( [$fileName] )" 4 .IX Item "new( [$fileName] )" .PD 0 .ie n .IP "new( { filename => $fileName } )" 4 .el .IP "new( { filename => \f(CW$fileName\fR } )" 4 .IX Item "new( { filename => $fileName } )" .PD Make a new, empty zip archive. .Sp .Vb 1 \& my $zip = Archive::Zip\->new(); .Ve .Sp If an additional argument is passed, \fInew()\fR will call \fIread()\fR to read the contents of an archive: .Sp .Vb 1 \& my $zip = Archive::Zip\->new( \*(Aqxyz.zip\*(Aq ); .Ve .Sp If a filename argument is passed and the read fails for any reason, new will return undef. For this reason, it may be better to call read separately. .SS "Zip Archive Utility Methods" .IX Subsection "Zip Archive Utility Methods" These Archive::Zip methods may be called as functions or as object methods. Do not call them as class methods: .PP .Vb 4 \& $zip = Archive::Zip\->new(); \& $crc = Archive::Zip::computeCRC32( \*(Aqghijkl\*(Aq ); # OK \& $crc = $zip\->computeCRC32( \*(Aqghijkl\*(Aq ); # also OK \& $crc = Archive::Zip\->computeCRC32( \*(Aqghijkl\*(Aq ); # NOT OK .Ve .ie n .IP "Archive::Zip::computeCRC32( $string [, $crc] )" 4 .el .IP "Archive::Zip::computeCRC32( \f(CW$string\fR [, \f(CW$crc\fR] )" 4 .IX Item "Archive::Zip::computeCRC32( $string [, $crc] )" .PD 0 .ie n .IP "Archive::Zip::computeCRC32( { string => $string [, checksum => $crc ] } )" 4 .el .IP "Archive::Zip::computeCRC32( { string => \f(CW$string\fR [, checksum => \f(CW$crc\fR ] } )" 4 .IX Item "Archive::Zip::computeCRC32( { string => $string [, checksum => $crc ] } )" .PD This is a utility function that uses the Compress::Raw::Zlib \s-1CRC\s0 routine to compute a \s-1CRC\-32.\s0 You can get the \s-1CRC\s0 of a string: .Sp .Vb 1 \& $crc = Archive::Zip::computeCRC32( $string ); .Ve .Sp Or you can compute the running \s-1CRC:\s0 .Sp .Vb 3 \& $crc = 0; \& $crc = Archive::Zip::computeCRC32( \*(Aqabcdef\*(Aq, $crc ); \& $crc = Archive::Zip::computeCRC32( \*(Aqghijkl\*(Aq, $crc ); .Ve .ie n .IP "Archive::Zip::setChunkSize( $number )" 4 .el .IP "Archive::Zip::setChunkSize( \f(CW$number\fR )" 4 .IX Item "Archive::Zip::setChunkSize( $number )" .PD 0 .ie n .IP "Archive::Zip::setChunkSize( { chunkSize => $number } )" 4 .el .IP "Archive::Zip::setChunkSize( { chunkSize => \f(CW$number\fR } )" 4 .IX Item "Archive::Zip::setChunkSize( { chunkSize => $number } )" .PD Report or change chunk size used for reading and writing. This can make big differences in dealing with large files. Currently, this defaults to 32K. This also changes the chunk size used for Compress::Raw::Zlib. You must call \fIsetChunkSize()\fR before reading or writing. This is not exportable, so you must call it like: .Sp .Vb 1 \& Archive::Zip::setChunkSize( 4096 ); .Ve .Sp or as a method on a zip (though this is a global setting). Returns old chunk size. .IP "\fIArchive::Zip::chunkSize()\fR" 4 .IX Item "Archive::Zip::chunkSize()" Returns the current chunk size: .Sp .Vb 1 \& my $chunkSize = Archive::Zip::chunkSize(); .Ve .IP "Archive::Zip::setErrorHandler( \e&subroutine )" 4 .IX Item "Archive::Zip::setErrorHandler( &subroutine )" .PD 0 .IP "Archive::Zip::setErrorHandler( { subroutine => \e&subroutine } )" 4 .IX Item "Archive::Zip::setErrorHandler( { subroutine => &subroutine } )" .PD Change the subroutine called with error strings. This defaults to \e&Carp::carp, but you may want to change it to get the error strings. This is not exportable, so you must call it like: .Sp .Vb 1 \& Archive::Zip::setErrorHandler( \e&myErrorHandler ); .Ve .Sp If myErrorHandler is undef, resets handler to default. Returns old error handler. Note that if you call Carp::carp or a similar routine or if you're chaining to the default error handler from your error handler, you may want to increment the number of caller levels that are skipped (do not just set it to a number): .Sp .Vb 1 \& $Carp::CarpLevel++; .Ve .ie n .IP "Archive::Zip::tempFile( [ $tmpdir ] )" 4 .el .IP "Archive::Zip::tempFile( [ \f(CW$tmpdir\fR ] )" 4 .IX Item "Archive::Zip::tempFile( [ $tmpdir ] )" .PD 0 .ie n .IP "Archive::Zip::tempFile( { tempDir => $tmpdir } )" 4 .el .IP "Archive::Zip::tempFile( { tempDir => \f(CW$tmpdir\fR } )" 4 .IX Item "Archive::Zip::tempFile( { tempDir => $tmpdir } )" .PD Create a uniquely named temp file. It will be returned open for read/write. If \f(CW$tmpdir\fR is given, it is used as the name of a directory to create the file in. If not given, creates the file using \f(CW\*(C`File::Spec::tmpdir()\*(C'\fR. Generally, you can override this choice using the .Sp .Vb 1 \& $ENV{TMPDIR} .Ve .Sp environment variable. But see the File::Spec documentation for your system. Note that on many systems, if you're running in taint mode, then you must make sure that \f(CW$ENV{TMPDIR}\fR is untainted for it to be used. Will \fI\s-1NOT\s0\fR create \f(CW$tmpdir\fR if it does not exist (this is a change from prior versions!). Returns file handle and name: .Sp .Vb 3 \& my ($fh, $name) = Archive::Zip::tempFile(); \& my ($fh, $name) = Archive::Zip::tempFile(\*(AqmyTempDir\*(Aq); \& my $fh = Archive::Zip::tempFile(); # if you don\*(Aqt need the name .Ve .SS "Zip Archive Accessors" .IX Subsection "Zip Archive Accessors" .IP "\fImembers()\fR" 4 .IX Item "members()" Return a copy of the members array .Sp .Vb 1 \& my @members = $zip\->members(); .Ve .IP "\fInumberOfMembers()\fR" 4 .IX Item "numberOfMembers()" Return the number of members I have .IP "\fImemberNames()\fR" 4 .IX Item "memberNames()" Return a list of the (internal) file names of the zip members .ie n .IP "memberNamed( $string )" 4 .el .IP "memberNamed( \f(CW$string\fR )" 4 .IX Item "memberNamed( $string )" .PD 0 .ie n .IP "memberNamed( { zipName => $string } )" 4 .el .IP "memberNamed( { zipName => \f(CW$string\fR } )" 4 .IX Item "memberNamed( { zipName => $string } )" .PD Return ref to member whose filename equals given filename or undef. \f(CW$string\fR must be in Zip (Unix) filename format. .ie n .IP "membersMatching( $regex )" 4 .el .IP "membersMatching( \f(CW$regex\fR )" 4 .IX Item "membersMatching( $regex )" .PD 0 .ie n .IP "membersMatching( { regex => $regex } )" 4 .el .IP "membersMatching( { regex => \f(CW$regex\fR } )" 4 .IX Item "membersMatching( { regex => $regex } )" .PD Return array of members whose filenames match given regular expression in list context. Returns number of matching members in scalar context. .Sp .Vb 3 \& my @textFileMembers = $zip\->membersMatching( \*(Aq.*\e.txt\*(Aq ); \& # or \& my $numberOfTextFiles = $zip\->membersMatching( \*(Aq.*\e.txt\*(Aq ); .Ve .IP "\fIdiskNumber()\fR" 4 .IX Item "diskNumber()" Return the disk that I start on. Not used for writing zips, but might be interesting if you read a zip in. This should be 0, as Archive::Zip does not handle multi-volume archives. .IP "\fIdiskNumberWithStartOfCentralDirectory()\fR" 4 .IX Item "diskNumberWithStartOfCentralDirectory()" Return the disk number that holds the beginning of the central directory. Not used for writing zips, but might be interesting if you read a zip in. This should be 0, as Archive::Zip does not handle multi-volume archives. .IP "\fInumberOfCentralDirectoriesOnThisDisk()\fR" 4 .IX Item "numberOfCentralDirectoriesOnThisDisk()" Return the number of \s-1CD\s0 structures in the zipfile last read in. Not used for writing zips, but might be interesting if you read a zip in. .IP "\fInumberOfCentralDirectories()\fR" 4 .IX Item "numberOfCentralDirectories()" Return the number of \s-1CD\s0 structures in the zipfile last read in. Not used for writing zips, but might be interesting if you read a zip in. .IP "\fIcentralDirectorySize()\fR" 4 .IX Item "centralDirectorySize()" Returns central directory size, as read from an external zip file. Not used for writing zips, but might be interesting if you read a zip in. .IP "\fIcentralDirectoryOffsetWRTStartingDiskNumber()\fR" 4 .IX Item "centralDirectoryOffsetWRTStartingDiskNumber()" Returns the offset into the zip file where the \s-1CD\s0 begins. Not used for writing zips, but might be interesting if you read a zip in. .ie n .IP "zipfileComment( [ $string ] )" 4 .el .IP "zipfileComment( [ \f(CW$string\fR ] )" 4 .IX Item "zipfileComment( [ $string ] )" .PD 0 .ie n .IP "zipfileComment( [ { comment => $string } ] )" 4 .el .IP "zipfileComment( [ { comment => \f(CW$string\fR } ] )" 4 .IX Item "zipfileComment( [ { comment => $string } ] )" .PD Get or set the zipfile comment. Returns the old comment. .Sp .Vb 2 \& print $zip\->zipfileComment(); \& $zip\->zipfileComment( \*(AqNew Comment\*(Aq ); .Ve .IP "\fIeocdOffset()\fR" 4 .IX Item "eocdOffset()" Returns the (unexpected) number of bytes between where the \&\s-1EOCD\s0 was found and where it expected to be. This is normally 0, but would be positive if something (a virus, perhaps) had added bytes somewhere before the \s-1EOCD.\s0 Not used for writing zips, but might be interesting if you read a zip in. Here is an example of how you can diagnose this: .Sp .Vb 5 \& my $zip = Archive::Zip\->new(\*(Aqsomefile.zip\*(Aq); \& if ($zip\->eocdOffset()) \& { \& warn "A virus has added ", $zip\->eocdOffset, " bytes of garbage\en"; \& } .Ve .Sp The \f(CW\*(C`eocdOffset()\*(C'\fR is used to adjust the starting position of member headers, if necessary. .IP "\fIfileName()\fR" 4 .IX Item "fileName()" Returns the name of the file last read from. If nothing has been read yet, returns an empty string; if read from a file handle, returns the handle in string form. .SS "Zip Archive Member Operations" .IX Subsection "Zip Archive Member Operations" Various operations on a zip file modify members. When a member is passed as an argument, you can either use a reference to the member itself, or the name of a member. Of course, using the name requires that names be unique within a zip (this is not enforced). .ie n .IP "removeMember( $memberOrName )" 4 .el .IP "removeMember( \f(CW$memberOrName\fR )" 4 .IX Item "removeMember( $memberOrName )" .PD 0 .ie n .IP "removeMember( { memberOrZipName => $memberOrName } )" 4 .el .IP "removeMember( { memberOrZipName => \f(CW$memberOrName\fR } )" 4 .IX Item "removeMember( { memberOrZipName => $memberOrName } )" .PD Remove and return the given member, or match its name and remove it. Returns undef if member or name does not exist in this Zip. No-op if member does not belong to this zip. .ie n .IP "replaceMember( $memberOrName, $newMember )" 4 .el .IP "replaceMember( \f(CW$memberOrName\fR, \f(CW$newMember\fR )" 4 .IX Item "replaceMember( $memberOrName, $newMember )" .PD 0 .ie n .IP "replaceMember( { memberOrZipName => $memberOrName, newMember => $newMember } )" 4 .el .IP "replaceMember( { memberOrZipName => \f(CW$memberOrName\fR, newMember => \f(CW$newMember\fR } )" 4 .IX Item "replaceMember( { memberOrZipName => $memberOrName, newMember => $newMember } )" .PD Remove and return the given member, or match its name and remove it. Replace with new member. Returns undef if member or name does not exist in this Zip, or if \f(CW$newMember\fR is undefined. .Sp It is an (undiagnosed) error to provide a \f(CW$newMember\fR that is a member of the zip being modified. .Sp .Vb 4 \& my $member1 = $zip\->removeMember( \*(Aqxyz\*(Aq ); \& my $member2 = $zip\->replaceMember( \*(Aqabc\*(Aq, $member1 ); \& # now, $member2 (named \*(Aqabc\*(Aq) is not in $zip, \& # and $member1 (named \*(Aqxyz\*(Aq) is, having taken $member2\*(Aqs place. .Ve .ie n .IP "extractMember( $memberOrName [, $extractedName ] )" 4 .el .IP "extractMember( \f(CW$memberOrName\fR [, \f(CW$extractedName\fR ] )" 4 .IX Item "extractMember( $memberOrName [, $extractedName ] )" .PD 0 .ie n .IP "extractMember( { memberOrZipName => $memberOrName [, name => $extractedName ] } )" 4 .el .IP "extractMember( { memberOrZipName => \f(CW$memberOrName\fR [, name => \f(CW$extractedName\fR ] } )" 4 .IX Item "extractMember( { memberOrZipName => $memberOrName [, name => $extractedName ] } )" .PD Extract the given member, or match its name and extract it. Returns undef if member does not exist in this Zip. If optional second arg is given, use it as the name of the extracted member. Otherwise, the internal filename of the member is used as the name of the extracted file or directory. If you pass \f(CW$extractedName\fR, it should be in the local file system's format. All necessary directories will be created. Returns \f(CW\*(C`AZ_OK\*(C'\fR on success. .ie n .IP "extractMemberWithoutPaths( $memberOrName [, $extractedName ] )" 4 .el .IP "extractMemberWithoutPaths( \f(CW$memberOrName\fR [, \f(CW$extractedName\fR ] )" 4 .IX Item "extractMemberWithoutPaths( $memberOrName [, $extractedName ] )" .PD 0 .ie n .IP "extractMemberWithoutPaths( { memberOrZipName => $memberOrName [, name => $extractedName ] } )" 4 .el .IP "extractMemberWithoutPaths( { memberOrZipName => \f(CW$memberOrName\fR [, name => \f(CW$extractedName\fR ] } )" 4 .IX Item "extractMemberWithoutPaths( { memberOrZipName => $memberOrName [, name => $extractedName ] } )" .PD Extract the given member, or match its name and extract it. Does not use path information (extracts into the current directory). Returns undef if member does not exist in this Zip. If optional second arg is given, use it as the name of the extracted member (its paths will be deleted too). Otherwise, the internal filename of the member (minus paths) is used as the name of the extracted file or directory. Returns \f(CW\*(C`AZ_OK\*(C'\fR on success. .ie n .IP "addMember( $member )" 4 .el .IP "addMember( \f(CW$member\fR )" 4 .IX Item "addMember( $member )" .PD 0 .ie n .IP "addMember( { member => $member } )" 4 .el .IP "addMember( { member => \f(CW$member\fR } )" 4 .IX Item "addMember( { member => $member } )" .PD Append a member (possibly from another zip file) to the zip file. Returns the new member. Generally, you will use \&\fIaddFile()\fR, \fIaddDirectory()\fR, \fIaddFileOrDirectory()\fR, \fIaddString()\fR, or \fIread()\fR to add members. .Sp .Vb 3 \& # Move member named \*(Aqabc\*(Aq to end of zip: \& my $member = $zip\->removeMember( \*(Aqabc\*(Aq ); \& $zip\->addMember( $member ); .Ve .ie n .IP "updateMember( $memberOrName, $fileName )" 4 .el .IP "updateMember( \f(CW$memberOrName\fR, \f(CW$fileName\fR )" 4 .IX Item "updateMember( $memberOrName, $fileName )" .PD 0 .ie n .IP "updateMember( { memberOrZipName => $memberOrName, name => $fileName } )" 4 .el .IP "updateMember( { memberOrZipName => \f(CW$memberOrName\fR, name => \f(CW$fileName\fR } )" 4 .IX Item "updateMember( { memberOrZipName => $memberOrName, name => $fileName } )" .PD Update a single member from the file or directory named \f(CW$fileName\fR. Returns the (possibly added or updated) member, if any; \f(CW\*(C`undef\*(C'\fR on errors. The comparison is based on \f(CW\*(C`lastModTime()\*(C'\fR and (in the case of a non-directory) the size of the file. .ie n .IP "addFile( $fileName [, $newName, $compressionLevel ] )" 4 .el .IP "addFile( \f(CW$fileName\fR [, \f(CW$newName\fR, \f(CW$compressionLevel\fR ] )" 4 .IX Item "addFile( $fileName [, $newName, $compressionLevel ] )" .PD 0 .ie n .IP "addFile( { filename => $fileName [, zipName => $newName, compressionLevel => $compressionLevel } ] )" 4 .el .IP "addFile( { filename => \f(CW$fileName\fR [, zipName => \f(CW$newName\fR, compressionLevel => \f(CW$compressionLevel\fR } ] )" 4 .IX Item "addFile( { filename => $fileName [, zipName => $newName, compressionLevel => $compressionLevel } ] )" .PD Append a member whose data comes from an external file, returning the member or undef. The member will have its file name set to the name of the external file, and its desiredCompressionMethod set to \s-1COMPRESSION_DEFLATED.\s0 The file attributes and last modification time will be set from the file. If the name given does not represent a readable plain file or symbolic link, undef will be returned. \f(CW$fileName\fR must be in the format required for the local file system. The optional \f(CW$newName\fR argument sets the internal file name to something different than the given \f(CW$fileName\fR. \f(CW$newName\fR, if given, must be in Zip name format (i.e. Unix). The text mode bit will be set if the contents appears to be text (as returned by the \f(CW\*(C`\-T\*(C'\fR perl operator). .Sp \&\fI\s-1NOTE\s0\fR that you should not (generally) use absolute path names in zip member names, as this will cause problems with some zip tools as well as introduce a security hole and make the zip harder to use. .ie n .IP "addDirectory( $directoryName [, $fileName ] )" 4 .el .IP "addDirectory( \f(CW$directoryName\fR [, \f(CW$fileName\fR ] )" 4 .IX Item "addDirectory( $directoryName [, $fileName ] )" .PD 0 .ie n .IP "addDirectory( { directoryName => $directoryName [, zipName => $fileName ] } )" 4 .el .IP "addDirectory( { directoryName => \f(CW$directoryName\fR [, zipName => \f(CW$fileName\fR ] } )" 4 .IX Item "addDirectory( { directoryName => $directoryName [, zipName => $fileName ] } )" .PD Append a member created from the given directory name. The directory name does not have to name an existing directory. If the named directory exists, the file modification time and permissions are set from the existing directory, otherwise they are set to now and permissive default permissions. \&\f(CW$directoryName\fR must be in local file system format. The optional second argument sets the name of the archive member (which defaults to \f(CW$directoryName\fR). If given, it must be in Zip (Unix) format. Returns the new member. .ie n .IP "addFileOrDirectory( $name [, $newName, $compressionLevel ] )" 4 .el .IP "addFileOrDirectory( \f(CW$name\fR [, \f(CW$newName\fR, \f(CW$compressionLevel\fR ] )" 4 .IX Item "addFileOrDirectory( $name [, $newName, $compressionLevel ] )" .PD 0 .ie n .IP "addFileOrDirectory( { name => $name [, zipName => $newName, compressionLevel => $compressionLevel ] } )" 4 .el .IP "addFileOrDirectory( { name => \f(CW$name\fR [, zipName => \f(CW$newName\fR, compressionLevel => \f(CW$compressionLevel\fR ] } )" 4 .IX Item "addFileOrDirectory( { name => $name [, zipName => $newName, compressionLevel => $compressionLevel ] } )" .PD Append a member from the file or directory named \f(CW$name\fR. If \&\f(CW$newName\fR is given, use it for the name of the new member. Will add or remove trailing slashes from \f(CW$newName\fR as needed. \&\f(CW$name\fR must be in local file system format. The optional second argument sets the name of the archive member (which defaults to \f(CW$name\fR). If given, it must be in Zip (Unix) format. .ie n .IP "addString( $stringOrStringRef, $name, [$compressionLevel] )" 4 .el .IP "addString( \f(CW$stringOrStringRef\fR, \f(CW$name\fR, [$compressionLevel] )" 4 .IX Item "addString( $stringOrStringRef, $name, [$compressionLevel] )" .PD 0 .ie n .IP "addString( { string => $stringOrStringRef [, zipName => $name, compressionLevel => $compressionLevel ] } )" 4 .el .IP "addString( { string => \f(CW$stringOrStringRef\fR [, zipName => \f(CW$name\fR, compressionLevel => \f(CW$compressionLevel\fR ] } )" 4 .IX Item "addString( { string => $stringOrStringRef [, zipName => $name, compressionLevel => $compressionLevel ] } )" .PD Append a member created from the given string or string reference. The name is given by the second argument. Returns the new member. The last modification time will be set to now, and the file attributes will be set to permissive defaults. .Sp .Vb 1 \& my $member = $zip\->addString( \*(AqThis is a test\*(Aq, \*(Aqtest.txt\*(Aq ); .Ve .ie n .IP "contents( $memberOrMemberName [, $newContents ] )" 4 .el .IP "contents( \f(CW$memberOrMemberName\fR [, \f(CW$newContents\fR ] )" 4 .IX Item "contents( $memberOrMemberName [, $newContents ] )" .PD 0 .ie n .IP "contents( { memberOrZipName => $memberOrMemberName [, contents => $newContents ] } )" 4 .el .IP "contents( { memberOrZipName => \f(CW$memberOrMemberName\fR [, contents => \f(CW$newContents\fR ] } )" 4 .IX Item "contents( { memberOrZipName => $memberOrMemberName [, contents => $newContents ] } )" .PD Returns the uncompressed data for a particular member, or undef. .Sp .Vb 1 \& print "xyz.txt contains " . $zip\->contents( \*(Aqxyz.txt\*(Aq ); .Ve .Sp Also can change the contents of a member: .Sp .Vb 1 \& $zip\->contents( \*(Aqxyz.txt\*(Aq, \*(AqThis is the new contents\*(Aq ); .Ve .Sp If called expecting an array as the return value, it will include the status as the second value in the array. .Sp .Vb 1 \& ($content, $status) = $zip\->contents( \*(Aqxyz.txt\*(Aq); .Ve .SS "Zip Archive I/O operations" .IX Subsection "Zip Archive I/O operations" A Zip archive can be written to a file or file handle, or read from one. .ie n .IP "writeToFileNamed( $fileName )" 4 .el .IP "writeToFileNamed( \f(CW$fileName\fR )" 4 .IX Item "writeToFileNamed( $fileName )" .PD 0 .ie n .IP "writeToFileNamed( { fileName => $fileName } )" 4 .el .IP "writeToFileNamed( { fileName => \f(CW$fileName\fR } )" 4 .IX Item "writeToFileNamed( { fileName => $fileName } )" .PD Write a zip archive to named file. Returns \f(CW\*(C`AZ_OK\*(C'\fR on success. .Sp .Vb 2 \& my $status = $zip\->writeToFileNamed( \*(Aqxx.zip\*(Aq ); \& die "error somewhere" if $status != AZ_OK; .Ve .Sp Note that if you use the same name as an existing zip file that you read in, you will clobber ZipFileMembers. So instead, write to a different file name, then delete the original. If you use the \f(CW\*(C`overwrite()\*(C'\fR or \f(CW\*(C`overwriteAs()\*(C'\fR methods, you can re-write the original zip in this way. \&\f(CW$fileName\fR should be a valid file name on your system. .ie n .IP "writeToFileHandle( $fileHandle [, $seekable] )" 4 .el .IP "writeToFileHandle( \f(CW$fileHandle\fR [, \f(CW$seekable\fR] )" 4 .IX Item "writeToFileHandle( $fileHandle [, $seekable] )" Write a zip archive to a file handle. Return \s-1AZ_OK\s0 on success. The optional second arg tells whether or not to try to seek backwards to re-write headers. If not provided, it is set if the Perl \f(CW\*(C`\-f\*(C'\fR test returns true. This could fail on some operating systems, though. .Sp .Vb 4 \& my $fh = IO::File\->new( \*(AqsomeFile.zip\*(Aq, \*(Aqw\*(Aq ); \& unless ( $zip\->writeToFileHandle( $fh ) == AZ_OK ) { \& # error handling \& } .Ve .Sp If you pass a file handle that is not seekable (like if you're writing to a pipe or a socket), pass a false second argument: .Sp .Vb 2 \& my $fh = IO::File\->new( \*(Aq| cat > somefile.zip\*(Aq, \*(Aqw\*(Aq ); \& $zip\->writeToFileHandle( $fh, 0 ); # fh is not seekable .Ve .Sp If this method fails during the write of a member, that member and all following it will return false from \&\f(CW\*(C`wasWritten()\*(C'\fR. See \fIwriteCentralDirectory()\fR for a way to deal with this. If you want, you can write data to the file handle before passing it to \fIwriteToFileHandle()\fR; this could be used (for instance) for making self-extracting archives. However, this only works reliably when writing to a real file (as opposed to \s-1STDOUT\s0 or some other possible non-file). .Sp See examples/selfex.pl for how to write a self-extracting archive. .ie n .IP "writeCentralDirectory( $fileHandle [, $offset ] )" 4 .el .IP "writeCentralDirectory( \f(CW$fileHandle\fR [, \f(CW$offset\fR ] )" 4 .IX Item "writeCentralDirectory( $fileHandle [, $offset ] )" .PD 0 .ie n .IP "writeCentralDirectory( { fileHandle => $fileHandle [, offset => $offset ] } )" 4 .el .IP "writeCentralDirectory( { fileHandle => \f(CW$fileHandle\fR [, offset => \f(CW$offset\fR ] } )" 4 .IX Item "writeCentralDirectory( { fileHandle => $fileHandle [, offset => $offset ] } )" .PD Writes the central directory structure to the given file handle. .Sp Returns \s-1AZ_OK\s0 on success. If given an \f(CW$offset\fR, will seek to that point before writing. This can be used for recovery in cases where writeToFileHandle or writeToFileNamed returns an \s-1IO\s0 error because of running out of space on the destination file. .Sp You can truncate the zip by seeking backwards and then writing the directory: .Sp .Vb 10 \& my $fh = IO::File\->new( \*(AqsomeFile.zip\*(Aq, \*(Aqw\*(Aq ); \& my $retval = $zip\->writeToFileHandle( $fh ); \& if ( $retval == AZ_IO_ERROR ) { \& my @unwritten = grep { not $_\->wasWritten() } $zip\->members(); \& if (@unwritten) { \& $zip\->removeMember( $member ) foreach my $member ( @unwritten ); \& $zip\->writeCentralDirectory( $fh, \& $unwritten[0]\->writeLocalHeaderRelativeOffset()); \& } \& } .Ve .ie n .IP "overwriteAs( $newName )" 4 .el .IP "overwriteAs( \f(CW$newName\fR )" 4 .IX Item "overwriteAs( $newName )" .PD 0 .ie n .IP "overwriteAs( { filename => $newName } )" 4 .el .IP "overwriteAs( { filename => \f(CW$newName\fR } )" 4 .IX Item "overwriteAs( { filename => $newName } )" .PD Write the zip to the specified file, as safely as possible. This is done by first writing to a temp file, then renaming the original if it exists, then renaming the temp file, then deleting the renamed original if it exists. Returns \s-1AZ_OK\s0 if successful. .IP "\fIoverwrite()\fR" 4 .IX Item "overwrite()" Write back to the original zip file. See \fIoverwriteAs()\fR above. If the zip was not ever read from a file, this generates an error. .ie n .IP "read( $fileName )" 4 .el .IP "read( \f(CW$fileName\fR )" 4 .IX Item "read( $fileName )" .PD 0 .ie n .IP "read( { filename => $fileName } )" 4 .el .IP "read( { filename => \f(CW$fileName\fR } )" 4 .IX Item "read( { filename => $fileName } )" .PD Read zipfile headers from a zip file, appending new members. Returns \f(CW\*(C`AZ_OK\*(C'\fR or error code. .Sp .Vb 2 \& my $zipFile = Archive::Zip\->new(); \& my $status = $zipFile\->read( \*(Aq/some/FileName.zip\*(Aq ); .Ve .ie n .IP "readFromFileHandle( $fileHandle, $filename )" 4 .el .IP "readFromFileHandle( \f(CW$fileHandle\fR, \f(CW$filename\fR )" 4 .IX Item "readFromFileHandle( $fileHandle, $filename )" .PD 0 .ie n .IP "readFromFileHandle( { fileHandle => $fileHandle, filename => $filename } )" 4 .el .IP "readFromFileHandle( { fileHandle => \f(CW$fileHandle\fR, filename => \f(CW$filename\fR } )" 4 .IX Item "readFromFileHandle( { fileHandle => $fileHandle, filename => $filename } )" .PD Read zipfile headers from an already-opened file handle, appending new members. Does not close the file handle. Returns \f(CW\*(C`AZ_OK\*(C'\fR or error code. Note that this requires a seekable file handle; reading from a stream is not yet supported, but using in-memory data is. .Sp .Vb 5 \& my $fh = IO::File\->new( \*(Aq/some/FileName.zip\*(Aq, \*(Aqr\*(Aq ); \& my $zip1 = Archive::Zip\->new(); \& my $status = $zip1\->readFromFileHandle( $fh ); \& my $zip2 = Archive::Zip\->new(); \& $status = $zip2\->readFromFileHandle( $fh ); .Ve .Sp Read zip using in-memory data (recursable): .Sp .Vb 5 \& open my $fh, "<", "archive.zip" or die $!; \& my $zip_data = do { local $.; <$fh> }; \& my $zip = Archive::Zip\->new; \& open my $dh, "+<", \e$zip_data; \& $zip\->readFromFileHandle ($dh); .Ve .SS "Zip Archive Tree operations" .IX Subsection "Zip Archive Tree operations" These used to be in Archive::Zip::Tree but got moved into Archive::Zip. They enable operation on an entire tree of members or files. A usage example: .PP .Vb 2 \& use Archive::Zip; \& my $zip = Archive::Zip\->new(); \& \& # add all readable files and directories below . as xyz/* \& $zip\->addTree( \*(Aq.\*(Aq, \*(Aqxyz\*(Aq ); \& \& # add all readable plain files below /abc as def/* \& $zip\->addTree( \*(Aq/abc\*(Aq, \*(Aqdef\*(Aq, sub { \-f && \-r } ); \& \& # add all .c files below /tmp as stuff/* \& $zip\->addTreeMatching( \*(Aq/tmp\*(Aq, \*(Aqstuff\*(Aq, \*(Aq\e.c$\*(Aq ); \& \& # add all .o files below /tmp as stuff/* if they aren\*(Aqt writable \& $zip\->addTreeMatching( \*(Aq/tmp\*(Aq, \*(Aqstuff\*(Aq, \*(Aq\e.o$\*(Aq, sub { ! \-w } ); \& \& # add all .so files below /tmp that are smaller than 200 bytes as stuff/* \& $zip\->addTreeMatching( \*(Aq/tmp\*(Aq, \*(Aqstuff\*(Aq, \*(Aq\e.o$\*(Aq, sub { \-s < 200 } ); \& \& # and write them into a file \& $zip\->writeToFileNamed(\*(Aqxxx.zip\*(Aq); \& \& # now extract the same files into /tmpx \& $zip\->extractTree( \*(Aqstuff\*(Aq, \*(Aq/tmpx\*(Aq ); .Ve .ie n .IP "$zip\->addTree( $root, $dest [, $pred, $compressionLevel ] ) \*(-- Add tree of files to a zip" 4 .el .IP "\f(CW$zip\fR\->addTree( \f(CW$root\fR, \f(CW$dest\fR [, \f(CW$pred\fR, \f(CW$compressionLevel\fR ] ) \*(-- Add tree of files to a zip" 4 .IX Item "$zip->addTree( $root, $dest [, $pred, $compressionLevel ] ) Add tree of files to a zip" .PD 0 .ie n .IP "$zip\->addTree( { root => $root, zipName => $dest [, select => $pred, compressionLevel => $compressionLevel ] )" 4 .el .IP "\f(CW$zip\fR\->addTree( { root => \f(CW$root\fR, zipName => \f(CW$dest\fR [, select => \f(CW$pred\fR, compressionLevel => \f(CW$compressionLevel\fR ] )" 4 .IX Item "$zip->addTree( { root => $root, zipName => $dest [, select => $pred, compressionLevel => $compressionLevel ] )" .PD \&\f(CW$root\fR is the root of the tree of files and directories to be added. It is a valid directory name on your system. \f(CW$dest\fR is the name for the root in the zip file (undef or blank means to use relative pathnames). It is a valid \s-1ZIP\s0 directory name (that is, it uses forward slashes (/) for separating directory components). \f(CW$pred\fR is an optional subroutine reference to select files: it is passed the name of the prospective file or directory using \f(CW$_\fR, and if it returns true, the file or directory will be included. The default is to add all readable files and directories. For instance, using .Sp .Vb 2 \& my $pred = sub { /\e.txt/ }; \& $zip\->addTree( \*(Aq.\*(Aq, \*(Aq\*(Aq, $pred ); .Ve .Sp will add all the .txt files in and below the current directory, using relative names, and making the names identical in the zipfile: .Sp .Vb 4 \& original name zip member name \& ./xyz xyz \& ./a/ a/ \& ./a/b a/b .Ve .Sp To translate absolute to relative pathnames, just pass them in: \f(CW$zip\fR\->addTree( '/c/d', 'a' ); .Sp .Vb 4 \& original name zip member name \& /c/d/xyz a/xyz \& /c/d/a/ a/a/ \& /c/d/a/b a/a/b .Ve .Sp Returns \s-1AZ_OK\s0 on success. Note that this will not follow symbolic links to directories. Note also that this does not check for the validity of filenames. .Sp Note that you generally \fIdon't\fR want to make zip archive member names absolute. .ie n .IP "$zip\->addTreeMatching( $root, $dest, $pattern [, $pred, $compressionLevel ] )" 4 .el .IP "\f(CW$zip\fR\->addTreeMatching( \f(CW$root\fR, \f(CW$dest\fR, \f(CW$pattern\fR [, \f(CW$pred\fR, \f(CW$compressionLevel\fR ] )" 4 .IX Item "$zip->addTreeMatching( $root, $dest, $pattern [, $pred, $compressionLevel ] )" .PD 0 .ie n .IP "$zip\->addTreeMatching( { root => $root, zipName => $dest, pattern => $pattern [, select => $pred, compressionLevel => $compressionLevel ] } )" 4 .el .IP "\f(CW$zip\fR\->addTreeMatching( { root => \f(CW$root\fR, zipName => \f(CW$dest\fR, pattern => \f(CW$pattern\fR [, select => \f(CW$pred\fR, compressionLevel => \f(CW$compressionLevel\fR ] } )" 4 .IX Item "$zip->addTreeMatching( { root => $root, zipName => $dest, pattern => $pattern [, select => $pred, compressionLevel => $compressionLevel ] } )" .PD \&\f(CW$root\fR is the root of the tree of files and directories to be added \f(CW$dest\fR is the name for the root in the zip file (undef means to use relative pathnames) \f(CW$pattern\fR is a (non-anchored) regular expression for filenames to match \f(CW$pred\fR is an optional subroutine reference to select files: it is passed the name of the prospective file or directory in \f(CW$_\fR, and if it returns true, the file or directory will be included. The default is to add all readable files and directories. To add all files in and below the current directory whose names end in \f(CW\*(C`.pl\*(C'\fR, and make them extract into a subdirectory named \f(CW\*(C`xyz\*(C'\fR, do this: .Sp .Vb 1 \& $zip\->addTreeMatching( \*(Aq.\*(Aq, \*(Aqxyz\*(Aq, \*(Aq\e.pl$\*(Aq ) .Ve .Sp To add all \fIwritable\fR files in and below the directory named \&\f(CW\*(C`/abc\*(C'\fR whose names end in \f(CW\*(C`.pl\*(C'\fR, and make them extract into a subdirectory named \f(CW\*(C`xyz\*(C'\fR, do this: .Sp .Vb 1 \& $zip\->addTreeMatching( \*(Aq/abc\*(Aq, \*(Aqxyz\*(Aq, \*(Aq\e.pl$\*(Aq, sub { \-w } ) .Ve .Sp Returns \s-1AZ_OK\s0 on success. Note that this will not follow symbolic links to directories. .ie n .IP "$zip\->updateTree( $root [, $dest , $pred , $mirror, $compressionLevel ] );" 4 .el .IP "\f(CW$zip\fR\->updateTree( \f(CW$root\fR [, \f(CW$dest\fR , \f(CW$pred\fR , \f(CW$mirror\fR, \f(CW$compressionLevel\fR ] );" 4 .IX Item "$zip->updateTree( $root [, $dest , $pred , $mirror, $compressionLevel ] );" .PD 0 .ie n .IP "$zip\->updateTree( { root => $root [, zipName => $dest, select => $pred, mirror => $mirror, compressionLevel => $compressionLevel ] } );" 4 .el .IP "\f(CW$zip\fR\->updateTree( { root => \f(CW$root\fR [, zipName => \f(CW$dest\fR, select => \f(CW$pred\fR, mirror => \f(CW$mirror\fR, compressionLevel => \f(CW$compressionLevel\fR ] } );" 4 .IX Item "$zip->updateTree( { root => $root [, zipName => $dest, select => $pred, mirror => $mirror, compressionLevel => $compressionLevel ] } );" .PD Update a zip file from a directory tree. .Sp \&\f(CW\*(C`updateTree()\*(C'\fR takes the same arguments as \f(CW\*(C`addTree()\*(C'\fR, but first checks to see whether the file or directory already exists in the zip file, and whether it has been changed. .Sp If the fourth argument \f(CW$mirror\fR is true, then delete all my members if corresponding files were not found. .Sp Returns an error code or \s-1AZ_OK\s0 if all is well. .ie n .IP "$zip\->extractTree( [ $root, $dest, $volume } ] )" 4 .el .IP "\f(CW$zip\fR\->extractTree( [ \f(CW$root\fR, \f(CW$dest\fR, \f(CW$volume\fR } ] )" 4 .IX Item "$zip->extractTree( [ $root, $dest, $volume } ] )" .PD 0 .ie n .IP "$zip\->extractTree( [ { root => $root, zipName => $dest, volume => $volume } ] )" 4 .el .IP "\f(CW$zip\fR\->extractTree( [ { root => \f(CW$root\fR, zipName => \f(CW$dest\fR, volume => \f(CW$volume\fR } ] )" 4 .IX Item "$zip->extractTree( [ { root => $root, zipName => $dest, volume => $volume } ] )" .PD If you don't give any arguments at all, will extract all the files in the zip with their original names. .Sp If you supply one argument for \f(CW$root\fR, \f(CW\*(C`extractTree\*(C'\fR will extract all the members whose names start with \f(CW$root\fR into the current directory, stripping off \f(CW$root\fR first. \&\f(CW$root\fR is in Zip (Unix) format. For instance, .Sp .Vb 1 \& $zip\->extractTree( \*(Aqa\*(Aq ); .Ve .Sp when applied to a zip containing the files: a/x a/b/c ax/d/e d/e will extract: .Sp a/x as ./x .Sp a/b/c as ./b/c .Sp If you give two arguments, \f(CW\*(C`extractTree\*(C'\fR extracts all the members whose names start with \f(CW$root\fR. It will translate \f(CW$root\fR into \&\f(CW$dest\fR to construct the destination file name. \&\f(CW$root\fR and \f(CW$dest\fR are in Zip (Unix) format. For instance, .Sp .Vb 1 \& $zip\->extractTree( \*(Aqa\*(Aq, \*(Aqd/e\*(Aq ); .Ve .Sp when applied to a zip containing the files: a/x a/b/c ax/d/e d/e will extract: .Sp a/x to d/e/x .Sp a/b/c to d/e/b/c and ignore ax/d/e and d/e .Sp If you give three arguments, \f(CW\*(C`extractTree\*(C'\fR extracts all the members whose names start with \f(CW$root\fR. It will translate \f(CW$root\fR into \&\f(CW$dest\fR to construct the destination file name, and then it will convert to local file system format, using \f(CW$volume\fR as the name of the destination volume. .Sp \&\f(CW$root\fR and \f(CW$dest\fR are in Zip (Unix) format. .Sp \&\f(CW$volume\fR is in local file system format. .Sp For instance, under Windows, .Sp .Vb 1 \& $zip\->extractTree( \*(Aqa\*(Aq, \*(Aqd/e\*(Aq, \*(Aqf:\*(Aq ); .Ve .Sp when applied to a zip containing the files: a/x a/b/c ax/d/e d/e will extract: .Sp a/x to f:d/e/x .Sp a/b/c to f:d/e/b/c and ignore ax/d/e and d/e .Sp If you want absolute paths (the prior example used paths relative to the current directory on the destination volume, you can specify these in \f(CW$dest\fR: .Sp .Vb 1 \& $zip\->extractTree( \*(Aqa\*(Aq, \*(Aq/d/e\*(Aq, \*(Aqf:\*(Aq ); .Ve .Sp when applied to a zip containing the files: a/x a/b/c ax/d/e d/e will extract: .Sp a/x to f:\ed\ee\ex .Sp a/b/c to f:\ed\ee\eb\ec and ignore ax/d/e and d/e .Sp Returns an error code or \s-1AZ_OK\s0 if everything worked \s-1OK.\s0 .SH "Archive::Zip Global Variables" .IX Header "Archive::Zip Global Variables" .ie n .IP "$Archive::Zip::UNICODE" 4 .el .IP "\f(CW$Archive::Zip::UNICODE\fR" 4 .IX Item "$Archive::Zip::UNICODE" This variable governs how Unicode file and directory names are added to or extracted from an archive. If set, file and directory names are considered to be \s-1UTF\-8\s0 encoded. This is \fI\s-1EXPERIMENTAL AND BUGGY \s0(there are some edge cases on Win32)\fR. Please report problems. .Sp .Vb 4 \& { \& local $Archive::Zip::UNICODE = 1; \& $zip\->addFile(\*(AqDéjà vu.txt\*(Aq); \& } .Ve .SH "MEMBER OPERATIONS" .IX Header "MEMBER OPERATIONS" .SS "Member Class Methods" .IX Subsection "Member Class Methods" Several constructors allow you to construct members without adding them to a zip archive. These work the same as the \fIaddFile()\fR, \&\fIaddDirectory()\fR, and \fIaddString()\fR zip instance methods described above, but they don't add the new members to a zip. .ie n .IP "Archive::Zip::Member\->newFromString( $stringOrStringRef [, $fileName ] )" 4 .el .IP "Archive::Zip::Member\->newFromString( \f(CW$stringOrStringRef\fR [, \f(CW$fileName\fR ] )" 4 .IX Item "Archive::Zip::Member->newFromString( $stringOrStringRef [, $fileName ] )" .PD 0 .ie n .IP "Archive::Zip::Member\->newFromString( { string => $stringOrStringRef [, zipName => $fileName ] )" 4 .el .IP "Archive::Zip::Member\->newFromString( { string => \f(CW$stringOrStringRef\fR [, zipName => \f(CW$fileName\fR ] )" 4 .IX Item "Archive::Zip::Member->newFromString( { string => $stringOrStringRef [, zipName => $fileName ] )" .PD Construct a new member from the given string. Returns undef on error. .Sp .Vb 1 \& my $member = Archive::Zip::Member\->newFromString( \*(AqThis is a test\*(Aq, .Ve .ie n .IP "newFromFile( $fileName [, $zipName ] )" 4 .el .IP "newFromFile( \f(CW$fileName\fR [, \f(CW$zipName\fR ] )" 4 .IX Item "newFromFile( $fileName [, $zipName ] )" .PD 0 .ie n .IP "newFromFile( { filename => $fileName [, zipName => $zipName ] } )" 4 .el .IP "newFromFile( { filename => \f(CW$fileName\fR [, zipName => \f(CW$zipName\fR ] } )" 4 .IX Item "newFromFile( { filename => $fileName [, zipName => $zipName ] } )" .PD Construct a new member from the given file. Returns undef on error. .Sp .Vb 1 \& my $member = Archive::Zip::Member\->newFromFile( \*(Aqxyz.txt\*(Aq ); .Ve .ie n .IP "newDirectoryNamed( $directoryName [, $zipname ] )" 4 .el .IP "newDirectoryNamed( \f(CW$directoryName\fR [, \f(CW$zipname\fR ] )" 4 .IX Item "newDirectoryNamed( $directoryName [, $zipname ] )" .PD 0 .ie n .IP "newDirectoryNamed( { directoryName => $directoryName [, zipName => $zipname ] } )" 4 .el .IP "newDirectoryNamed( { directoryName => \f(CW$directoryName\fR [, zipName => \f(CW$zipname\fR ] } )" 4 .IX Item "newDirectoryNamed( { directoryName => $directoryName [, zipName => $zipname ] } )" .PD Construct a new member from the given directory. \&\f(CW$directoryName\fR must be a valid name on your file system; it does not have to exist. .Sp If given, \f(CW$zipname\fR will be the name of the zip member; it must be a valid Zip (Unix) name. If not given, it will be converted from \&\f(CW$directoryName\fR. .Sp Returns undef on error. .Sp .Vb 1 \& my $member = Archive::Zip::Member\->newDirectoryNamed( \*(AqCVS/\*(Aq ); .Ve .SS "Member Simple accessors" .IX Subsection "Member Simple accessors" These methods get (and/or set) member attribute values. .IP "\fIversionMadeBy()\fR" 4 .IX Item "versionMadeBy()" Gets the field from the member header. .ie n .IP "fileAttributeFormat( [ $format ] )" 4 .el .IP "fileAttributeFormat( [ \f(CW$format\fR ] )" 4 .IX Item "fileAttributeFormat( [ $format ] )" .PD 0 .ie n .IP "fileAttributeFormat( [ { format => $format ] } )" 4 .el .IP "fileAttributeFormat( [ { format => \f(CW$format\fR ] } )" 4 .IX Item "fileAttributeFormat( [ { format => $format ] } )" .PD Gets or sets the field from the member header. These are \&\f(CW\*(C`FA_*\*(C'\fR values. .IP "\fIversionNeededToExtract()\fR" 4 .IX Item "versionNeededToExtract()" Gets the field from the member header. .IP "\fIbitFlag()\fR" 4 .IX Item "bitFlag()" Gets the general purpose bit field from the member header. This is where the \f(CW\*(C`GPBF_*\*(C'\fR bits live. .IP "\fIcompressionMethod()\fR" 4 .IX Item "compressionMethod()" Returns the member compression method. This is the method that is currently being used to compress the member data. This will be \s-1COMPRESSION_STORED\s0 for added string or file members, or any of the \f(CW\*(C`COMPRESSION_*\*(C'\fR values for members from a zip file. However, this module can only handle members whose data is in \s-1COMPRESSION_STORED\s0 or \s-1COMPRESSION_DEFLATED\s0 format. .ie n .IP "desiredCompressionMethod( [ $method ] )" 4 .el .IP "desiredCompressionMethod( [ \f(CW$method\fR ] )" 4 .IX Item "desiredCompressionMethod( [ $method ] )" .PD 0 .ie n .IP "desiredCompressionMethod( [ { compressionMethod => $method } ] )" 4 .el .IP "desiredCompressionMethod( [ { compressionMethod => \f(CW$method\fR } ] )" 4 .IX Item "desiredCompressionMethod( [ { compressionMethod => $method } ] )" .PD Get or set the member's \f(CW\*(C`desiredCompressionMethod\*(C'\fR. This is the compression method that will be used when the member is written. Returns prior desiredCompressionMethod. Only \&\s-1COMPRESSION_DEFLATED\s0 or \s-1COMPRESSION_STORED\s0 are valid arguments. Changing to \s-1COMPRESSION_STORED\s0 will change the member desiredCompressionLevel to 0; changing to \&\s-1COMPRESSION_DEFLATED\s0 will change the member desiredCompressionLevel to \s-1COMPRESSION_LEVEL_DEFAULT.\s0 .ie n .IP "desiredCompressionLevel( [ $level ] )" 4 .el .IP "desiredCompressionLevel( [ \f(CW$level\fR ] )" 4 .IX Item "desiredCompressionLevel( [ $level ] )" .PD 0 .ie n .IP "desiredCompressionLevel( [ { compressionLevel => $level } ] )" 4 .el .IP "desiredCompressionLevel( [ { compressionLevel => \f(CW$level\fR } ] )" 4 .IX Item "desiredCompressionLevel( [ { compressionLevel => $level } ] )" .PD Get or set the member's desiredCompressionLevel This is the method that will be used to write. Returns prior desiredCompressionLevel. Valid arguments are 0 through 9, \&\s-1COMPRESSION_LEVEL_NONE, COMPRESSION_LEVEL_DEFAULT, COMPRESSION_LEVEL_BEST_COMPRESSION,\s0 and \&\s-1COMPRESSION_LEVEL_FASTEST. 0\s0 or \s-1COMPRESSION_LEVEL_NONE\s0 will change the desiredCompressionMethod to \s-1COMPRESSION_STORED.\s0 All other arguments will change the desiredCompressionMethod to \s-1COMPRESSION_DEFLATED.\s0 .IP "\fIexternalFileName()\fR" 4 .IX Item "externalFileName()" Return the member's external file name, if any, or undef. .IP "\fIfileName()\fR" 4 .IX Item "fileName()" Get or set the member's internal filename. Returns the (possibly new) filename. Names will have backslashes converted to forward slashes, and will have multiple consecutive slashes converted to single ones. .IP "\fIlastModFileDateTime()\fR" 4 .IX Item "lastModFileDateTime()" Return the member's last modification date/time stamp in MS-DOS format. .IP "\fIlastModTime()\fR" 4 .IX Item "lastModTime()" Return the member's last modification date/time stamp, converted to unix localtime format. .Sp .Vb 1 \& print "Mod Time: " . scalar( localtime( $member\->lastModTime() ) ); .Ve .IP "\fIsetLastModFileDateTimeFromUnix()\fR" 4 .IX Item "setLastModFileDateTimeFromUnix()" Set the member's lastModFileDateTime from the given unix time. .Sp .Vb 1 \& $member\->setLastModFileDateTimeFromUnix( time() ); .Ve .IP "\fIinternalFileAttributes()\fR" 4 .IX Item "internalFileAttributes()" Return the internal file attributes field from the zip header. This is only set for members read from a zip file. .IP "\fIexternalFileAttributes()\fR" 4 .IX Item "externalFileAttributes()" Return member attributes as read from the \s-1ZIP\s0 file. Note that these are \s-1NOT UNIX\s0! .ie n .IP "unixFileAttributes( [ $newAttributes ] )" 4 .el .IP "unixFileAttributes( [ \f(CW$newAttributes\fR ] )" 4 .IX Item "unixFileAttributes( [ $newAttributes ] )" .PD 0 .ie n .IP "unixFileAttributes( [ { attributes => $newAttributes } ] )" 4 .el .IP "unixFileAttributes( [ { attributes => \f(CW$newAttributes\fR } ] )" 4 .IX Item "unixFileAttributes( [ { attributes => $newAttributes } ] )" .PD Get or set the member's file attributes using \s-1UNIX\s0 file attributes. Returns old attributes. .Sp .Vb 1 \& my $oldAttribs = $member\->unixFileAttributes( 0666 ); .Ve .Sp Note that the return value has more than just the file permissions, so you will have to mask off the lowest bits for comparisons. .ie n .IP "localExtraField( [ $newField ] )" 4 .el .IP "localExtraField( [ \f(CW$newField\fR ] )" 4 .IX Item "localExtraField( [ $newField ] )" .PD 0 .ie n .IP "localExtraField( [ { field => $newField } ] )" 4 .el .IP "localExtraField( [ { field => \f(CW$newField\fR } ] )" 4 .IX Item "localExtraField( [ { field => $newField } ] )" .PD Gets or sets the extra field that was read from the local header. This is not set for a member from a zip file until after the member has been written out. The extra field must be in the proper format. .ie n .IP "cdExtraField( [ $newField ] )" 4 .el .IP "cdExtraField( [ \f(CW$newField\fR ] )" 4 .IX Item "cdExtraField( [ $newField ] )" .PD 0 .ie n .IP "cdExtraField( [ { field => $newField } ] )" 4 .el .IP "cdExtraField( [ { field => \f(CW$newField\fR } ] )" 4 .IX Item "cdExtraField( [ { field => $newField } ] )" .PD Gets or sets the extra field that was read from the central directory header. The extra field must be in the proper format. .IP "\fIextraFields()\fR" 4 .IX Item "extraFields()" Return both local and \s-1CD\s0 extra fields, concatenated. .ie n .IP "fileComment( [ $newComment ] )" 4 .el .IP "fileComment( [ \f(CW$newComment\fR ] )" 4 .IX Item "fileComment( [ $newComment ] )" .PD 0 .ie n .IP "fileComment( [ { comment => $newComment } ] )" 4 .el .IP "fileComment( [ { comment => \f(CW$newComment\fR } ] )" 4 .IX Item "fileComment( [ { comment => $newComment } ] )" .PD Get or set the member's file comment. .IP "\fIhasDataDescriptor()\fR" 4 .IX Item "hasDataDescriptor()" Get or set the data descriptor flag. If this is set, the local header will not necessarily have the correct data sizes. Instead, a small structure will be stored at the end of the member data with these values. This should be transparent in normal operation. .IP "\fIcrc32()\fR" 4 .IX Item "crc32()" Return the \s-1CRC\-32\s0 value for this member. This will not be set for members that were constructed from strings or external files until after the member has been written. .IP "\fIcrc32String()\fR" 4 .IX Item "crc32String()" Return the \s-1CRC\-32\s0 value for this member as an 8 character printable hex string. This will not be set for members that were constructed from strings or external files until after the member has been written. .IP "\fIcompressedSize()\fR" 4 .IX Item "compressedSize()" Return the compressed size for this member. This will not be set for members that were constructed from strings or external files until after the member has been written. .IP "\fIuncompressedSize()\fR" 4 .IX Item "uncompressedSize()" Return the uncompressed size for this member. .ie n .IP "password( [ $password ] )" 4 .el .IP "password( [ \f(CW$password\fR ] )" 4 .IX Item "password( [ $password ] )" Returns the password for this member to be used on decryption. If \f(CW$password\fR is given, it will set the password for the decryption. .IP "\fIisEncrypted()\fR" 4 .IX Item "isEncrypted()" Return true if this member is encrypted. The Archive::Zip module does not currently support creation of encrypted members. Decryption works more or less like this: .Sp .Vb 5 \& my $zip = Archive::Zip\->new; \& $zip\->read ("encrypted.zip"); \& for my $m (map { $zip\->memberNamed ($_) } $zip\->memberNames) { \& $m\->password ("secret"); \& $m\->contents; # is "" when password was wrong .Ve .Sp That shows that the password has to be set per member, and not per archive. This might change in the future. .ie n .IP "isTextFile( [ $flag ] )" 4 .el .IP "isTextFile( [ \f(CW$flag\fR ] )" 4 .IX Item "isTextFile( [ $flag ] )" .PD 0 .ie n .IP "isTextFile( [ { flag => $flag } ] )" 4 .el .IP "isTextFile( [ { flag => \f(CW$flag\fR } ] )" 4 .IX Item "isTextFile( [ { flag => $flag } ] )" .PD Returns true if I am a text file. Also can set the status if given an argument (then returns old state). Note that this module does not currently do anything with this flag upon extraction or storage. That is, bytes are stored in native format whether or not they came from a text file. .IP "\fIisBinaryFile()\fR" 4 .IX Item "isBinaryFile()" Returns true if I am a binary file. Also can set the status if given an argument (then returns old state). Note that this module does not currently do anything with this flag upon extraction or storage. That is, bytes are stored in native format whether or not they came from a text file. .ie n .IP "extractToFileNamed( $fileName )" 4 .el .IP "extractToFileNamed( \f(CW$fileName\fR )" 4 .IX Item "extractToFileNamed( $fileName )" .PD 0 .ie n .IP "extractToFileNamed( { name => $fileName } )" 4 .el .IP "extractToFileNamed( { name => \f(CW$fileName\fR } )" 4 .IX Item "extractToFileNamed( { name => $fileName } )" .PD Extract me to a file with the given name. The file will be created with default modes. Directories will be created as needed. The \f(CW$fileName\fR argument should be a valid file name on your file system. Returns \s-1AZ_OK\s0 on success. .IP "\fIisDirectory()\fR" 4 .IX Item "isDirectory()" Returns true if I am a directory. .IP "\fIwriteLocalHeaderRelativeOffset()\fR" 4 .IX Item "writeLocalHeaderRelativeOffset()" Returns the file offset in bytes the last time I was written. .IP "\fIwasWritten()\fR" 4 .IX Item "wasWritten()" Returns true if I was successfully written. Reset at the beginning of a write attempt. .SS "Low-level member data reading" .IX Subsection "Low-level member data reading" It is possible to use lower-level routines to access member data streams, rather than the extract* methods and \fIcontents()\fR. For instance, here is how to print the uncompressed contents of a member in chunks using these methods: .PP .Vb 10 \& my ( $member, $status, $bufferRef ); \& $member = $zip\->memberNamed( \*(Aqxyz.txt\*(Aq ); \& $member\->desiredCompressionMethod( COMPRESSION_STORED ); \& $status = $member\->rewindData(); \& die "error $status" unless $status == AZ_OK; \& while ( ! $member\->readIsDone() ) \& { \& ( $bufferRef, $status ) = $member\->readChunk(); \& die "error $status" \& if $status != AZ_OK && $status != AZ_STREAM_END; \& # do something with $bufferRef: \& print $$bufferRef; \& } \& $member\->endRead(); .Ve .ie n .IP "readChunk( [ $chunkSize ] )" 4 .el .IP "readChunk( [ \f(CW$chunkSize\fR ] )" 4 .IX Item "readChunk( [ $chunkSize ] )" .PD 0 .ie n .IP "readChunk( [ { chunkSize => $chunkSize } ] )" 4 .el .IP "readChunk( [ { chunkSize => \f(CW$chunkSize\fR } ] )" 4 .IX Item "readChunk( [ { chunkSize => $chunkSize } ] )" .PD This reads the next chunk of given size from the member's data stream and compresses or uncompresses it as necessary, returning a reference to the bytes read and a status. If size argument is not given, defaults to global set by Archive::Zip::setChunkSize. Status is \s-1AZ_OK\s0 on success until the last chunk, where it returns \s-1AZ_STREAM_END.\s0 Returns \f(CW\*(C`( \&\e$bytes, $status)\*(C'\fR. .Sp .Vb 2 \& my ( $outRef, $status ) = $self\->readChunk(); \& print $$outRef if $status != AZ_OK && $status != AZ_STREAM_END; .Ve .IP "\fIrewindData()\fR" 4 .IX Item "rewindData()" Rewind data and set up for reading data streams or writing zip files. Can take options for \f(CW\*(C`inflateInit()\*(C'\fR or \&\f(CW\*(C`deflateInit()\*(C'\fR, but this is not likely to be necessary. Subclass overrides should call this method. Returns \f(CW\*(C`AZ_OK\*(C'\fR on success. .IP "\fIendRead()\fR" 4 .IX Item "endRead()" Reset the read variables and free the inflater or deflater. Must be called to close files, etc. Returns \s-1AZ_OK\s0 on success. .IP "\fIreadIsDone()\fR" 4 .IX Item "readIsDone()" Return true if the read has run out of data or encountered an error. .IP "\fIcontents()\fR" 4 .IX Item "contents()" Return the entire uncompressed member data or undef in scalar context. When called in array context, returns \f(CW\*(C`( $string, $status )\*(C'\fR; status will be \s-1AZ_OK\s0 on success: .Sp .Vb 4 \& my $string = $member\->contents(); \& # or \& my ( $string, $status ) = $member\->contents(); \& die "error $status" unless $status == AZ_OK; .Ve .Sp Can also be used to set the contents of a member (this may change the class of the member): .Sp .Vb 1 \& $member\->contents( "this is my new contents" ); .Ve .ie n .IP "extractToFileHandle( $fh )" 4 .el .IP "extractToFileHandle( \f(CW$fh\fR )" 4 .IX Item "extractToFileHandle( $fh )" .PD 0 .ie n .IP "extractToFileHandle( { fileHandle => $fh } )" 4 .el .IP "extractToFileHandle( { fileHandle => \f(CW$fh\fR } )" 4 .IX Item "extractToFileHandle( { fileHandle => $fh } )" .PD Extract (and uncompress, if necessary) the member's contents to the given file handle. Return \s-1AZ_OK\s0 on success. .SH "Archive::Zip::FileMember methods" .IX Header "Archive::Zip::FileMember methods" The Archive::Zip::FileMember class extends Archive::Zip::Member. It is the base class for both ZipFileMember and NewFileMember classes. This class adds an \f(CW\*(C`externalFileName\*(C'\fR and an \f(CW\*(C`fh\*(C'\fR member to keep track of the external file. .IP "\fIexternalFileName()\fR" 4 .IX Item "externalFileName()" Return the member's external filename. .IP "\fIfh()\fR" 4 .IX Item "fh()" Return the member's read file handle. Automatically opens file if necessary. .SH "Archive::Zip::ZipFileMember methods" .IX Header "Archive::Zip::ZipFileMember methods" The Archive::Zip::ZipFileMember class represents members that have been read from external zip files. .IP "\fIdiskNumberStart()\fR" 4 .IX Item "diskNumberStart()" Returns the disk number that the member's local header resides in. Should be 0. .IP "\fIlocalHeaderRelativeOffset()\fR" 4 .IX Item "localHeaderRelativeOffset()" Returns the offset into the zip file where the member's local header is. .IP "\fIdataOffset()\fR" 4 .IX Item "dataOffset()" Returns the offset from the beginning of the zip file to the member's data. .SH "REQUIRED MODULES" .IX Header "REQUIRED MODULES" Archive::Zip requires several other modules: .PP Carp .PP Compress::Raw::Zlib .PP Cwd .PP File::Basename .PP File::Copy .PP File::Find .PP File::Path .PP File::Spec .PP IO::File .PP IO::Seekable .PP Time::Local .SH "BUGS AND CAVEATS" .IX Header "BUGS AND CAVEATS" .SS "When not to use Archive::Zip" .IX Subsection "When not to use Archive::Zip" If you are just going to be extracting zips (and/or other archives) you are recommended to look at using Archive::Extract instead, as it is much easier to use and factors out archive-specific functionality. .SS "Try to avoid IO::Scalar" .IX Subsection "Try to avoid IO::Scalar" One of the most common ways to use Archive::Zip is to generate Zip files in-memory. Most people use IO::Scalar for this purpose. .PP Unfortunately, as of 1.11 this module no longer works with IO::Scalar as it incorrectly implements seeking. .PP Anybody using IO::Scalar should consider porting to IO::String, which is smaller, lighter, and is implemented to be perfectly compatible with regular seekable filehandles. .PP Support for IO::Scalar most likely will \fBnot\fR be restored in the future, as IO::Scalar itself cannot change the way it is implemented due to back-compatibility issues. .SS "Wrong password for encrypted members" .IX Subsection "Wrong password for encrypted members" When an encrypted member is read using the wrong password, you currently have to re-read the entire archive to try again with the correct password. .SH "TO DO" .IX Header "TO DO" * auto-choosing storing vs compression .PP * extra field hooks (see notes.txt) .PP * check for duplicates on addition/renaming? .PP * Text file extraction (line end translation) .PP * Reading zip files from non-seekable inputs (Perhaps by proxying through IO::String?) .PP * separate unused constants into separate module .PP * cookbook style docs .PP * Handle tainted paths correctly .PP * Work on better compatibility with other \s-1IO::\s0 modules .PP * Support encryption .PP * More user-friendly decryption .SH "SUPPORT" .IX Header "SUPPORT" Bugs should be reported via the \s-1CPAN\s0 bug tracker .PP .PP For other issues contact the maintainer .SH "AUTHOR" .IX Header "AUTHOR" Currently maintained by Fred Moyer .PP Previously maintained by Adam Kennedy .PP Previously maintained by Steve Peters . .PP File attributes code by Maurice Aubrey . .PP Originally by Ned Konz . .SH "COPYRIGHT" .IX Header "COPYRIGHT" Some parts copyright 2006 \- 2012 Adam Kennedy. .PP Some parts copyright 2005 Steve Peters. .PP Original work copyright 2000 \- 2004 Ned Konz. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" Look at Archive::Zip::MemberRead which is a wrapper that allows one to read Zip archive members as if they were files. .PP Compress::Raw::Zlib, Archive::Tar, Archive::Extract