/
usr
/
local
/
share
/
man
/
man3
/
/usr/local/share/man/man3
mkdir
upload
Name
Size
Mode
Actions
App::Prove.3pm
10508
0444
edit
dl
rm
App::Prove::State.3pm
6005
0444
edit
dl
rm
App::Prove::State::Result.3pm
5619
0444
edit
dl
rm
App::Prove::State::Result::Test.3pm
5051
0444
edit
dl
rm
AppConfig.3pm
35289
0444
edit
dl
rm
AppConfig::Args.3pm
7992
0444
edit
dl
rm
AppConfig::CGI.3pm
6609
0444
edit
dl
rm
AppConfig::File.3pm
12614
0444
edit
dl
rm
AppConfig::Getopt.3pm
7444
0444
edit
dl
rm
AppConfig::State.3pm
24972
0444
edit
dl
rm
AppConfig::Sys.3pm
6695
0444
edit
dl
rm
Archive::Tar.3pm
44061
0444
edit
dl
rm
Archive::Tar::File.3pm
11083
0444
edit
dl
rm
Archive::Zip.3pm
69985
0444
edit
dl
rm
Archive::Zip::FAQ.3pm
18437
0444
edit
dl
rm
Archive::Zip::MemberRead.3pm
6734
0444
edit
dl
rm
Archive::Zip::Tree.3pm
2875
0444
edit
dl
rm
B::COW.3pm
5163
0444
edit
dl
rm
Canary::Stability.3pm
3727
0444
edit
dl
rm
CDB_File.3pm
14318
0444
edit
dl
rm
common::sense.3pm
0
0444
edit
dl
rm
Compress::Raw::Bzip2.3pm
13463
0444
edit
dl
rm
Compress::Raw::Zlib.3pm
42082
0444
edit
dl
rm
Compress::Zlib.3pm
38719
0444
edit
dl
rm
CPAN::Meta.3pm
15923
0444
edit
dl
rm
CPAN::Meta::Converter.3pm
6594
0444
edit
dl
rm
CPAN::Meta::Feature.3pm
4322
0444
edit
dl
rm
CPAN::Meta::History.3pm
7855
0444
edit
dl
rm
CPAN::Meta::History::Meta_1_0.3pm
9973
0444
edit
dl
rm
CPAN::Meta::History::Meta_1_1.3pm
12410
0444
edit
dl
rm
CPAN::Meta::History::Meta_1_2.3pm
22224
0444
edit
dl
rm
CPAN::Meta::History::Meta_1_3.3pm
23974
0444
edit
dl
rm
CPAN::Meta::History::Meta_1_4.3pm
24565
0444
edit
dl
rm
CPAN::Meta::Merge.3pm
5285
0444
edit
dl
rm
CPAN::Meta::Prereqs.3pm
7380
0444
edit
dl
rm
CPAN::Meta::Requirements.3pm
12308
0444
edit
dl
rm
CPAN::Meta::Spec.3pm
45592
0444
edit
dl
rm
CPAN::Meta::Validator.3pm
4215
0444
edit
dl
rm
CPAN::Meta::YAML.3pm
4230
0444
edit
dl
rm
Crypt::OpenSSL::Random.3pm
5634
0444
edit
dl
rm
Curses.3pm
37580
0444
edit
dl
rm
Curses::UI.3pm
15619
0444
edit
dl
rm
Curses::UI::Buttonbox.3pm
8908
0444
edit
dl
rm
Curses::UI::Calendar.3pm
8203
0444
edit
dl
rm
Curses::UI::Checkbox.3pm
6509
0444
edit
dl
rm
Curses::UI::Color.3pm
5903
0444
edit
dl
rm
Curses::UI::Common.3pm
6498
0444
edit
dl
rm
Curses::UI::Container.3pm
9041
0444
edit
dl
rm
Curses::UI::Dialog::Basic.3pm
5213
0444
edit
dl
rm
Curses::UI::Dialog::Calendar.3pm
4761
0444
edit
dl
rm
Curses::UI::Dialog::Dirbrowser.3pm
5369
0444
edit
dl
rm
Curses::UI::Dialog::Error.3pm
4307
0444
edit
dl
rm
Curses::UI::Dialog::Filebrowser.3pm
6889
0444
edit
dl
rm
Curses::UI::Dialog::Progress.3pm
5774
0444
edit
dl
rm
Curses::UI::Dialog::Question.3pm
5277
0444
edit
dl
rm
Curses::UI::Dialog::Status.3pm
4765
0444
edit
dl
rm
Curses::UI::Label.3pm
7333
0444
edit
dl
rm
Curses::UI::Listbox.3pm
11988
0444
edit
dl
rm
Curses::UI::Menubar.3pm
8110
0444
edit
dl
rm
Curses::UI::Notebook.3pm
9140
0444
edit
dl
rm
Curses::UI::PasswordEntry.3pm
3743
0444
edit
dl
rm
Curses::UI::Popupmenu.3pm
7431
0444
edit
dl
rm
Curses::UI::Progressbar.3pm
5891
0444
edit
dl
rm
Curses::UI::Radiobuttonbox.3pm
4069
0444
edit
dl
rm
Curses::UI::Searchable.3pm
6668
0444
edit
dl
rm
Curses::UI::TextEditor.3pm
14171
0444
edit
dl
rm
Curses::UI::TextEntry.3pm
3623
0444
edit
dl
rm
Curses::UI::TextViewer.3pm
3670
0444
edit
dl
rm
Curses::UI::Tutorial.3pm
8555
0444
edit
dl
rm
Curses::UI::Widget.3pm
25675
0444
edit
dl
rm
Curses::UI::Window.3pm
5084
0444
edit
dl
rm
Cwd.3pm
7183
0444
edit
dl
rm
Date::Format.3pm
7291
0444
edit
dl
rm
Date::Language.3pm
3809
0444
edit
dl
rm
Date::Language::Bulgarian.3pm
3675
0444
edit
dl
rm
Date::Language::Hungarian.3pm
3091
0444
edit
dl
rm
Date::Parse.3pm
5402
0444
edit
dl
rm
Digest::SHA.3pm
25759
0444
edit
dl
rm
Expect.3pm
60229
0444
edit
dl
rm
ExtUtils::CBuilder.3pm
11923
0444
edit
dl
rm
ExtUtils::CBuilder::Platform::Windows.3pm
3117
0444
edit
dl
rm
ExtUtils::Command.3pm
5942
0444
edit
dl
rm
ExtUtils::Command::MM.3pm
5723
0444
edit
dl
rm
ExtUtils::Liblist.3pm
12679
0444
edit
dl
rm
ExtUtils::MakeMaker.3pm
79357
0444
edit
dl
rm
ExtUtils::MakeMaker::Config.3pm
2587
0444
edit
dl
rm
ExtUtils::MakeMaker::FAQ.3pm
26829
0444
edit
dl
rm
ExtUtils::MakeMaker::Locale.3pm
11168
0444
edit
dl
rm
ExtUtils::MakeMaker::Tutorial.3pm
8389
0444
edit
dl
rm
ExtUtils::Manifest.3pm
11961
0444
edit
dl
rm
ExtUtils::Mkbootstrap.3pm
3459
0444
edit
dl
rm
ExtUtils::Mksymlists.3pm
6699
0444
edit
dl
rm
ExtUtils::MM.3pm
2829
0444
edit
dl
rm
ExtUtils::MM_AIX.3pm
3044
0444
edit
dl
rm
ExtUtils::MM_Any.3pm
31129
0444
edit
dl
rm
ExtUtils::MM_BeOS.3pm
2798
0444
edit
dl
rm
ExtUtils::MM_Cygwin.3pm
3569
0444
edit
dl
rm
ExtUtils::MM_Darwin.3pm
2688
0444
edit
dl
rm
ExtUtils::MM_DOS.3pm
3021
0444
edit
dl
rm
ExtUtils::MM_MacOS.3pm
2987
0444
edit
dl
rm
ExtUtils::MM_NW5.3pm
3200
0444
edit
dl
rm
ExtUtils::MM_OS2.3pm
2886
0444
edit
dl
rm
ExtUtils::MM_QNX.3pm
2942
0444
edit
dl
rm
ExtUtils::MM_Unix.3pm
21419
0444
edit
dl
rm
ExtUtils::MM_UWIN.3pm
3051
0444
edit
dl
rm
ExtUtils::MM_VMS.3pm
14900
0444
edit
dl
rm
ExtUtils::MM_VOS.3pm
2926
0444
edit
dl
rm
ExtUtils::MM_Win32.3pm
5919
0444
edit
dl
rm
ExtUtils::MM_Win95.3pm
3276
0444
edit
dl
rm
ExtUtils::MY.3pm
2764
0444
edit
dl
rm
ExtUtils::testlib.3pm
2690
0444
edit
dl
rm
File::GlobMapper.3pm
11447
0444
edit
dl
rm
File::HomeDir.3pm
18212
0444
edit
dl
rm
File::HomeDir::Darwin.3pm
3232
0444
edit
dl
rm
File::HomeDir::Darwin::Carbon.3pm
3517
0444
edit
dl
rm
File::HomeDir::Darwin::Cocoa.3pm
3446
0444
edit
dl
rm
File::HomeDir::Driver.3pm
3101
0444
edit
dl
rm
File::HomeDir::FreeDesktop.3pm
3487
0444
edit
dl
rm
File::HomeDir::MacOS9.3pm
3499
0444
edit
dl
rm
File::HomeDir::Test.3pm
3534
0444
edit
dl
rm
File::HomeDir::Unix.3pm
3638
0444
edit
dl
rm
File::HomeDir::Windows.3pm
4891
0444
edit
dl
rm
File::Path.3pm
31030
0444
edit
dl
rm
File::Slurp.3pm
23626
0444
edit
dl
rm
File::Spec.3pm
13784
0444
edit
dl
rm
File::Spec::AmigaOS.3pm
2826
0444
edit
dl
rm
File::Spec::Cygwin.3pm
3957
0444
edit
dl
rm
File::Spec::Epoc.3pm
3251
0444
edit
dl
rm
File::Spec::Functions.3pm
3799
0444
edit
dl
rm
File::Spec::Mac.3pm
18664
0444
edit
dl
rm
File::Spec::OS2.3pm
3118
0444
edit
dl
rm
File::Spec::Unix.3pm
9837
0444
edit
dl
rm
File::Spec::VMS.3pm
6389
0444
edit
dl
rm
File::Spec::Win32.3pm
6451
0444
edit
dl
rm
File::Temp.3pm
36799
0444
edit
dl
rm
File::Which.3pm
9746
0444
edit
dl
rm
Getopt::Long.3pm
52647
0444
edit
dl
rm
HDB.3pm
10947
0444
edit
dl
rm
HDB::CMDS.3pm
18894
0444
edit
dl
rm
HDB::Encode.3pm
7863
0444
edit
dl
rm
HDB::Object.3pm
10057
0444
edit
dl
rm
HTML::AsSubs.3pm
8586
0444
edit
dl
rm
HTML::Element.3pm
70793
0444
edit
dl
rm
HTML::Element::traverse.3pm
15984
0444
edit
dl
rm
HTML::Form.3pm
28158
0444
edit
dl
rm
HTML::Parse.3pm
8277
0444
edit
dl
rm
HTML::Tree.3pm
9982
0444
edit
dl
rm
HTML::Tree::AboutObjects.3pm
37918
0444
edit
dl
rm
HTML::Tree::AboutTrees.3pm
58534
0444
edit
dl
rm
HTML::Tree::Scanning.3pm
34385
0444
edit
dl
rm
HTML::TreeBuilder.3pm
30138
0444
edit
dl
rm
HTTP::Tiny.3pm
27709
0444
edit
dl
rm
IO::AtomicFile.3pm
5381
0444
edit
dl
rm
IO::Compress::Base.3pm
3506
0444
edit
dl
rm
IO::Compress::Bzip2.3pm
23260
0444
edit
dl
rm
IO::Compress::Deflate.3pm
26768
0444
edit
dl
rm
IO::Compress::FAQ.3pm
26718
0444
edit
dl
rm
IO::Compress::Gzip.3pm
34489
0444
edit
dl
rm
IO::Compress::RawDeflate.3pm
27134
0444
edit
dl
rm
IO::Compress::Zip.3pm
40870
0444
edit
dl
rm
IO::InnerFile.3pm
6035
0444
edit
dl
rm
IO::Lines.3pm
3783
0444
edit
dl
rm
IO::Pty.3pm
8579
0444
edit
dl
rm
IO::Scalar.3pm
10679
0444
edit
dl
rm
IO::ScalarArray.3pm
10528
0444
edit
dl
rm
IO::Stringy.3pm
4049
0444
edit
dl
rm
IO::Tty.3pm
8348
0444
edit
dl
rm
IO::Tty::Constant.3pm
10012
0444
edit
dl
rm
IO::Uncompress::AnyInflate.3pm
32800
0444
edit
dl
rm
IO::Uncompress::AnyUncompress.3pm
30767
0444
edit
dl
rm
IO::Uncompress::Base.3pm
3518
0444
edit
dl
rm
IO::Uncompress::Bunzip2.3pm
29171
0444
edit
dl
rm
IO::Uncompress::Gunzip.3pm
31719
0444
edit
dl
rm
IO::Uncompress::Inflate.3pm
29915
0444
edit
dl
rm
IO::Uncompress::RawInflate.3pm
29563
0444
edit
dl
rm
IO::Uncompress::Unzip.3pm
31279
0444
edit
dl
rm
IO::Wrap.3pm
10664
0444
edit
dl
rm
IO::WrapTie.3pm
14987
0444
edit
dl
rm
JSON::PP.3pm
50080
0444
edit
dl
rm
JSON::PP::Boolean.3pm
2667
0444
edit
dl
rm
JSON::Syck.3pm
8094
0444
edit
dl
rm
JSON::XS.3pm
89037
0444
edit
dl
rm
JSON::XS::Boolean.3pm
2857
0444
edit
dl
rm
lib::core::only.3pm
5647
0444
edit
dl
rm
local::lib.3pm
31390
0444
edit
dl
rm
LWP.3pm
28506
0444
edit
dl
rm
LWP::Authen::Ntlm.3pm
7489
0444
edit
dl
rm
LWP::ConnCache.3pm
9967
0444
edit
dl
rm
LWP::Debug.3pm
5608
0444
edit
dl
rm
LWP::MemberMixin.3pm
4821
0444
edit
dl
rm
LWP::Protocol.3pm
8350
0444
edit
dl
rm
LWP::Protocol::https.3pm
5684
0444
edit
dl
rm
LWP::RobotUA.3pm
9022
0444
edit
dl
rm
LWP::Simple.3pm
9016
0444
edit
dl
rm
LWP::UserAgent.3pm
48156
0444
edit
dl
rm
lwpcook.3pm
14838
0444
edit
dl
rm
lwptut.3pm
32441
0444
edit
dl
rm
Module::Build.3pm
44563
0444
edit
dl
rm
Module::Build::API.3pm
89267
0444
edit
dl
rm
Module::Build::Authoring.3pm
17363
0444
edit
dl
rm
Module::Build::Base.3pm
5157
0444
edit
dl
rm
Module::Build::Bundling.3pm
9999
0444
edit
dl
rm
Module::Build::Compat.3pm
10885
0444
edit
dl
rm
Module::Build::ConfigData.3pm
7388
0444
edit
dl
rm
Module::Build::Cookbook.3pm
25946
0444
edit
dl
rm
Module::Build::Notes.3pm
4690
0444
edit
dl
rm
Module::Build::Platform::aix.3pm
4472
0444
edit
dl
rm
Module::Build::Platform::cygwin.3pm
4505
0444
edit
dl
rm
Module::Build::Platform::darwin.3pm
4491
0444
edit
dl
rm
Module::Build::Platform::Default.3pm
4490
0444
edit
dl
rm
Module::Build::Platform::MacOS.3pm
5398
0444
edit
dl
rm
Module::Build::Platform::os2.3pm
4474
0444
edit
dl
rm
Module::Build::Platform::Unix.3pm
4481
0444
edit
dl
rm
Module::Build::Platform::VMS.3pm
7885
0444
edit
dl
rm
Module::Build::Platform::VOS.3pm
4477
0444
edit
dl
rm
Module::Build::Platform::Windows.3pm
4529
0444
edit
dl
rm
Module::Build::PPMMaker.3pm
4886
0444
edit
dl
rm
Mozilla::CA.3pm
3571
0444
edit
dl
rm
Net::CIDR::Lite.3pm
9562
0444
edit
dl
rm
Net::Cmd.3pm
11545
0444
edit
dl
rm
Net::Config.3pm
8100
0444
edit
dl
rm
Net::Domain.3pm
3835
0444
edit
dl
rm
Net::FTP.3pm
27341
0444
edit
dl
rm
Net::FTP::dataconn.3pm
3979
0444
edit
dl
rm
Net::HTTP.3pm
16375
0444
edit
dl
rm
Net::HTTP::NB.3pm
5394
0444
edit
dl
rm
Net::HTTPS.3pm
5438
0444
edit
dl
rm
Net::IP.3pm
27697
0444
edit
dl
rm
Net::libnetFAQ.3pm
14746
0444
edit
dl
rm
Net::Netrc.3pm
6729
0444
edit
dl
rm
Net::NNTP.3pm
23193
0444
edit
dl
rm
Net::POP3.3pm
12259
0444
edit
dl
rm
Net::SMTP.3pm
18880
0444
edit
dl
rm
Net::SSLeay.3pm
349350
0444
edit
dl
rm
Net::SSLeay::Handle.3pm
9127
0444
edit
dl
rm
Net::Time.3pm
4524
0444
edit
dl
rm
ok.3pm
2851
0444
edit
dl
rm
Parse::CPAN::Meta.3pm
10187
0444
edit
dl
rm
POD2::DE::local::lib.3pm
22879
0444
edit
dl
rm
POD2::PT_BR::local::lib.3pm
22762
0444
edit
dl
rm
Socket.3pm
34078
0444
edit
dl
rm
Sub::Identify.3pm
5087
0444
edit
dl
rm
SUPER.3pm
7394
0444
edit
dl
rm
Switch.3pm
19014
0444
edit
dl
rm
TAP::Base.3pm
3401
0444
edit
dl
rm
TAP::Formatter::Base.3pm
6233
0444
edit
dl
rm
TAP::Formatter::Color.3pm
3717
0444
edit
dl
rm
TAP::Formatter::Console.3pm
2722
0444
edit
dl
rm
TAP::Formatter::Console::ParallelSession.3pm
3065
0444
edit
dl
rm
TAP::Formatter::Console::Session.3pm
2832
0444
edit
dl
rm
TAP::Formatter::File.3pm
2693
0444
edit
dl
rm
TAP::Formatter::File::Session.3pm
2847
0444
edit
dl
rm
TAP::Formatter::Session.3pm
3603
0444
edit
dl
rm
TAP::Harness.3pm
21300
0444
edit
dl
rm
TAP::Harness::Beyond.3pm
19118
0444
edit
dl
rm
TAP::Harness::Env.3pm
5467
0444
edit
dl
rm
TAP::Object.3pm
4497
0444
edit
dl
rm
TAP::Parser.3pm
42210
0444
edit
dl
rm
TAP::Parser::Aggregator.3pm
8023
0444
edit
dl
rm
TAP::Parser::Grammar.3pm
8647
0444
edit
dl
rm
TAP::Parser::Iterator.3pm
4993
0444
edit
dl
rm
TAP::Parser::Iterator::Array.3pm
3771
0444
edit
dl
rm
TAP::Parser::Iterator::Process.3pm
4601
0444
edit
dl
rm
TAP::Parser::Iterator::Stream.3pm
3712
0444
edit
dl
rm
TAP::Parser::IteratorFactory.3pm
6904
0444
edit
dl
rm
TAP::Parser::Multiplexer.3pm
4646
0444
edit
dl
rm
TAP::Parser::Result.3pm
7512
0444
edit
dl
rm
TAP::Parser::Result::Bailout.3pm
3293
0444
edit
dl
rm
TAP::Parser::Result::Comment.3pm
3118
0444
edit
dl
rm
TAP::Parser::Result::Plan.3pm
4173
0444
edit
dl
rm
TAP::Parser::Result::Pragma.3pm
3073
0444
edit
dl
rm
TAP::Parser::Result::Test.3pm
7114
0444
edit
dl
rm
TAP::Parser::Result::Unknown.3pm
2973
0444
edit
dl
rm
TAP::Parser::Result::Version.3pm
3154
0444
edit
dl
rm
TAP::Parser::Result::YAML.3pm
3086
0444
edit
dl
rm
TAP::Parser::ResultFactory.3pm
5523
0444
edit
dl
rm
TAP::Parser::Scheduler.3pm
8113
0444
edit
dl
rm
TAP::Parser::Scheduler::Job.3pm
4301
0444
edit
dl
rm
TAP::Parser::Scheduler::Spinner.3pm
3346
0444
edit
dl
rm
TAP::Parser::Source.3pm
8170
0444
edit
dl
rm
TAP::Parser::SourceHandler.3pm
7559
0444
edit
dl
rm
TAP::Parser::SourceHandler::Executable.3pm
5297
0444
edit
dl
rm
TAP::Parser::SourceHandler::File.3pm
4567
0444
edit
dl
rm
TAP::Parser::SourceHandler::Handle.3pm
4425
0444
edit
dl
rm
TAP::Parser::SourceHandler::Perl.3pm
6262
0444
edit
dl
rm
TAP::Parser::SourceHandler::RawTAP.3pm
4434
0444
edit
dl
rm
TAP::Parser::YAMLish::Reader.3pm
3995
0444
edit
dl
rm
TAP::Parser::YAMLish::Writer.3pm
4879
0444
edit
dl
rm
Template.3pm
27909
0444
edit
dl
rm
Template::Base.3pm
8149
0444
edit
dl
rm
Template::Config.3pm
8687
0444
edit
dl
rm
Template::Constants.3pm
7815
0444
edit
dl
rm
Template::Context.3pm
26637
0444
edit
dl
rm
Template::Directive.3pm
4821
0444
edit
dl
rm
Template::Document.3pm
11829
0444
edit
dl
rm
Template::Exception.3pm
6763
0444
edit
dl
rm
Template::FAQ.3pm
14564
0444
edit
dl
rm
Template::Filters.3pm
9817
0444
edit
dl
rm
Template::Grammar.3pm
5039
0444
edit
dl
rm
Template::Iterator.3pm
11413
0444
edit
dl
rm
Template::Manual.3pm
6317
0444
edit
dl
rm
Template::Manual::Config.3pm
79504
0444
edit
dl
rm
Template::Manual::Credits.3pm
8246
0444
edit
dl
rm
Template::Manual::Directives.3pm
77293
0444
edit
dl
rm
Template::Manual::Filters.3pm
20810
0444
edit
dl
rm
Template::Manual::Internals.3pm
23433
0444
edit
dl
rm
Template::Manual::Intro.3pm
14092
0444
edit
dl
rm
Template::Manual::Plugins.3pm
13780
0444
edit
dl
rm
Template::Manual::Syntax.3pm
14549
0444
edit
dl
rm
Template::Manual::Variables.3pm
33110
0444
edit
dl
rm
Template::Manual::Views.3pm
25953
0444
edit
dl
rm
Template::Manual::VMethods.3pm
28195
0444
edit
dl
rm
Template::Modules.3pm
9827
0444
edit
dl
rm
Template::Namespace::Constants.3pm
6002
0444
edit
dl
rm
Template::Parser.3pm
9917
0444
edit
dl
rm
Template::Plugin.3pm
10937
0444
edit
dl
rm
Template::Plugin::Assert.3pm
5446
0444
edit
dl
rm
Template::Plugin::CGI.3pm
6188
0444
edit
dl
rm
Template::Plugin::Datafile.3pm
6601
0444
edit
dl
rm
Template::Plugin::Date.3pm
9538
0444
edit
dl
rm
Template::Plugin::Directory.3pm
11979
0444
edit
dl
rm
Template::Plugin::Dumper.3pm
6078
0444
edit
dl
rm
Template::Plugin::File.3pm
13009
0444
edit
dl
rm
Template::Plugin::Filter.3pm
12936
0444
edit
dl
rm
Template::Plugin::Format.3pm
4895
0444
edit
dl
rm
Template::Plugin::HTML.3pm
7823
0444
edit
dl
rm
Template::Plugin::Image.3pm
11950
0444
edit
dl
rm
Template::Plugin::Iterator.3pm
5061
0444
edit
dl
rm
Template::Plugin::Math.3pm
6623
0444
edit
dl
rm
Template::Plugin::Pod.3pm
4784
0444
edit
dl
rm
Template::Plugin::Procedural.3pm
5631
0444
edit
dl
rm
Template::Plugin::Scalar.3pm
5032
0444
edit
dl
rm
Template::Plugin::String.3pm
17263
0444
edit
dl
rm
Template::Plugin::Table.3pm
11145
0444
edit
dl
rm
Template::Plugin::URL.3pm
8080
0444
edit
dl
rm
Template::Plugin::View.3pm
5479
0444
edit
dl
rm
Template::Plugin::Wrap.3pm
6433
0444
edit
dl
rm
Template::Plugins.3pm
9733
0444
edit
dl
rm
Template::Provider.3pm
14678
0444
edit
dl
rm
Template::Service.3pm
14813
0444
edit
dl
rm
Template::Stash.3pm
11983
0444
edit
dl
rm
Template::Stash::Context.3pm
7130
0444
edit
dl
rm
Template::Stash::XS.3pm
6644
0444
edit
dl
rm
Template::Test.3pm
15524
0444
edit
dl
rm
Template::Toolkit.3pm
9227
0444
edit
dl
rm
Template::Tools.3pm
5001
0444
edit
dl
rm
Template::Tools::tpage.3pm
5806
0444
edit
dl
rm
Template::Tools::ttree.3pm
16567
0444
edit
dl
rm
Template::Tutorial.3pm
4566
0444
edit
dl
rm
Template::Tutorial::Datafile.3pm
19539
0444
edit
dl
rm
Template::Tutorial::Web.3pm
34118
0444
edit
dl
rm
Template::View.3pm
12618
0444
edit
dl
rm
Template::VMethods.3pm
4688
0444
edit
dl
rm
Term::ReadKey.3pm
13029
0444
edit
dl
rm
Test2.3pm
9556
0444
edit
dl
rm
Test2::API.3pm
30424
0444
edit
dl
rm
Test2::API::Breakage.3pm
4988
0444
edit
dl
rm
Test2::API::Context.3pm
17574
0444
edit
dl
rm
Test2::API::Instance.3pm
12404
0444
edit
dl
rm
Test2::API::Stack.3pm
6568
0444
edit
dl
rm
Test2::Event.3pm
9189
0444
edit
dl
rm
Test2::Event::Bail.3pm
3470
0444
edit
dl
rm
Test2::Event::Diag.3pm
3338
0444
edit
dl
rm
Test2::Event::Exception.3pm
3520
0444
edit
dl
rm
Test2::Event::Generic.3pm
7662
0444
edit
dl
rm
Test2::Event::Info.3pm
4261
0444
edit
dl
rm
Test2::Event::Note.3pm
3323
0444
edit
dl
rm
Test2::Event::Ok.3pm
4255
0444
edit
dl
rm
Test2::Event::Plan.3pm
3907
0444
edit
dl
rm
Test2::Event::Skip.3pm
3665
0444
edit
dl
rm
Test2::Event::Subtest.3pm
3573
0444
edit
dl
rm
Test2::Event::Waiting.3pm
3107
0444
edit
dl
rm
Test2::Formatter.3pm
5208
0444
edit
dl
rm
Test2::Formatter::TAP.3pm
9255
0444
edit
dl
rm
Test2::Hub.3pm
16755
0444
edit
dl
rm
Test2::Hub::Interceptor.3pm
2937
0444
edit
dl
rm
Test2::Hub::Interceptor::Terminator.3pm
2980
0444
edit
dl
rm
Test2::Hub::Subtest.3pm
3803
0444
edit
dl
rm
Test2::IPC.3pm
3324
0444
edit
dl
rm
Test2::IPC::Driver.3pm
9512
0444
edit
dl
rm
Test2::IPC::Driver::Files.3pm
3822
0444
edit
dl
rm
Test2::Transition.3pm
18406
0444
edit
dl
rm
Test2::Util.3pm
5123
0444
edit
dl
rm
Test2::Util::ExternalMeta.3pm
5594
0444
edit
dl
rm
Test2::Util::HashBase.3pm
7463
0444
edit
dl
rm
Test2::Util::Trace.3pm
5577
0444
edit
dl
rm
Test::Builder.3pm
26915
0444
edit
dl
rm
Test::Builder::Formatter.3pm
3656
0444
edit
dl
rm
Test::Builder::IO::Scalar.3pm
9740
0444
edit
dl
rm
Test::Builder::Module.3pm
5567
0444
edit
dl
rm
Test::Builder::Tester.3pm
11550
0444
edit
dl
rm
Test::Builder::Tester::Color.3pm
3131
0444
edit
dl
rm
Test::Builder::TodoDiag.3pm
3129
0444
edit
dl
rm
Test::Fatal.3pm
9303
0444
edit
dl
rm
Test::HACKING.3pm
9253
0444
edit
dl
rm
Test::Harness.3pm
11028
0444
edit
dl
rm
Test::LeakTrace.3pm
10022
0444
edit
dl
rm
Test::LeakTrace::JA.3pm
12328
0444
edit
dl
rm
Test::LeakTrace::Script.3pm
5140
0444
edit
dl
rm
Test::MockModule.3pm
10818
0444
edit
dl
rm
Test::More.3pm
43215
0444
edit
dl
rm
Test::More::UTF8.3pm
3602
0444
edit
dl
rm
Test::RequiresInternet.3pm
3944
0444
edit
dl
rm
Test::Simple.3pm
9119
0444
edit
dl
rm
Test::Tester.3pm
15781
0444
edit
dl
rm
Test::Tester::Capture.3pm
2902
0444
edit
dl
rm
Test::Tester::CaptureRunner.3pm
2673
0444
edit
dl
rm
Test::Tutorial.3pm
24261
0444
edit
dl
rm
Test::use::ok.3pm
3841
0444
edit
dl
rm
Test::Warnings.3pm
14231
0444
edit
dl
rm
Text::Glob.3pm
6106
0444
edit
dl
rm
Text::Template.3pm
65499
0444
edit
dl
rm
Text::Template::Preprocess.3pm
6270
0444
edit
dl
rm
Time::Zone.3pm
3413
0444
edit
dl
rm
TimeDate.3pm
2397
0444
edit
dl
rm
Try::Tiny.3pm
20343
0444
edit
dl
rm
Types::Serialiser.3pm
11473
0444
edit
dl
rm
Types::Serialiser::Error.3pm
2705
0444
edit
dl
rm
version.3pm
13937
0444
edit
dl
rm
version::Internals.3pm
30287
0444
edit
dl
rm
WWW::Mechanize.3pm
68196
0444
edit
dl
rm
WWW::Mechanize::Cookbook.3pm
7159
0444
edit
dl
rm
WWW::Mechanize::Examples.3pm
22490
0444
edit
dl
rm
WWW::Mechanize::FAQ.3pm
24359
0444
edit
dl
rm
WWW::Mechanize::Image.3pm
6490
0444
edit
dl
rm
WWW::Mechanize::Link.3pm
6518
0444
edit
dl
rm
XML::NamespaceSupport.3pm
13052
0444
edit
dl
rm
XML::Parser.3pm
26296
0444
edit
dl
rm
XML::Parser::Expat.3pm
26799
0444
edit
dl
rm
XML::Parser::Style::Debug.3pm
4408
0444
edit
dl
rm
XML::Parser::Style::Objects.3pm
4888
0444
edit
dl
rm
XML::Parser::Style::Stream.3pm
5925
0444
edit
dl
rm
XML::Parser::Style::Subs.3pm
4863
0444
edit
dl
rm
XML::Parser::Style::Tree.3pm
5529
0444
edit
dl
rm
XML::SAX.3pm
9229
0444
edit
dl
rm
XML::SAX::Base.3pm
13704
0444
edit
dl
rm
XML::SAX::BuildSAXBase.3pm
13700
0444
edit
dl
rm
XML::SAX::DocumentLocator.3pm
5239
0444
edit
dl
rm
XML::SAX::Exception.3pm
5622
0444
edit
dl
rm
XML::SAX::Expat.3pm
6404
0444
edit
dl
rm
XML::SAX::Intro.3pm
20220
0444
edit
dl
rm
XML::SAX::ParserFactory.3pm
7919
0444
edit
dl
rm
XML::SAX::PurePerl.3pm
6172
0444
edit
dl
rm
XML::SAX::PurePerl::Reader.3pm
4103
0444
edit
dl
rm
XML::Simple.3pm
65589
0444
edit
dl
rm
XML::Simple::FAQ.3pm
27223
0444
edit
dl
rm
YAML.3pm
29980
0444
edit
dl
rm
YAML::Any.3pm
7487
0444
edit
dl
rm
YAML::Dumper.3pm
4776
0444
edit
dl
rm
YAML::Dumper::Base.3pm
4642
0444
edit
dl
rm
YAML::Error.3pm
4681
0444
edit
dl
rm
YAML::Loader.3pm
4766
0444
edit
dl
rm
YAML::Loader::Base.3pm
4642
0444
edit
dl
rm
YAML::Marshall.3pm
4640
0444
edit
dl
rm
YAML::Node.3pm
6743
0444
edit
dl
rm
YAML::Syck.3pm
10806
0444
edit
dl
rm
YAML::Tag.3pm
4499
0444
edit
dl
rm
YAML::Types.3pm
4716
0444
edit
dl
rm
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 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Archive\-Zip> .PP For other issues contact the maintainer .SH "AUTHOR" .IX Header "AUTHOR" Currently maintained by Fred Moyer <fred@redhotpenguin.com> .PP Previously maintained by Adam Kennedy <adamk@cpan.org> .PP Previously maintained by Steve Peters <steve@fisharerojo.org>. .PP File attributes code by Maurice Aubrey <maurice@lovelyfilth.com>. .PP Originally by Ned Konz <nedkonz@cpan.org>. .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
Save
cmd:
run