/
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/WWW::Mechanize.3pm
(68196B)
.\" 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "WWW::Mechanize 3" .TH WWW::Mechanize 3 "2016-10-14" "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" WWW::Mechanize \- Handy web browsing in a Perl object .SH "VERSION" .IX Header "VERSION" version 1.83 .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\f(CW\*(C`WWW::Mechanize\*(C'\fR, or Mech for short, is a Perl module for stateful programmatic web browsing, used for automating interaction with websites. .PP Features include: .IP "\(bu" 4 All \s-1HTTP\s0 methods .IP "\(bu" 4 High-level hyperlink and \s-1HTML\s0 form support, without having to parse \s-1HTML\s0 yourself .IP "\(bu" 4 \&\s-1SSL\s0 support .IP "\(bu" 4 Automatic cookies .IP "\(bu" 4 Custom \s-1HTTP\s0 headers .IP "\(bu" 4 Automatic handling of redirections .IP "\(bu" 4 Proxies .IP "\(bu" 4 \&\s-1HTTP\s0 authentication .PP Mech supports performing a sequence of page fetches including following links and submitting forms. Each fetched page is parsed and its links and forms are extracted. A link or a form can be selected, form fields can be filled and the next page can be fetched. Mech also stores a history of the URLs you've visited, which can be queried and revisited. .PP .Vb 2 \& use WWW::Mechanize; \& my $mech = WWW::Mechanize\->new(); \& \& $mech\->get( $url ); \& \& $mech\->follow_link( n => 3 ); \& $mech\->follow_link( text_regex => qr/download this/i ); \& $mech\->follow_link( url => \*(Aqhttp://host.com/index.html\*(Aq ); \& \& $mech\->submit_form( \& form_number => 3, \& fields => { \& username => \*(Aqmungo\*(Aq, \& password => \*(Aqlost\-and\-alone\*(Aq, \& } \& ); \& \& $mech\->submit_form( \& form_name => \*(Aqsearch\*(Aq, \& fields => { query => \*(Aqpot of gold\*(Aq, }, \& button => \*(AqSearch Now\*(Aq \& ); .Ve .PP Mech is well suited for use in testing web applications. If you use one of the Test::*, like Test::HTML::Lint modules, you can check the fetched content and use that as input to a test call. .PP .Vb 2 \& use Test::More; \& like( $mech\->content(), qr/$expected/, "Got expected content" ); .Ve .PP Each page fetch stores its \s-1URL\s0 in a history stack which you can traverse. .PP .Vb 1 \& $mech\->back(); .Ve .PP If you want finer control over your page fetching, you can use these methods. \f(CW\*(C`follow_link\*(C'\fR and \f(CW\*(C`submit_form\*(C'\fR are just high level wrappers around them. .PP .Vb 7 \& $mech\->find_link( n => $number ); \& $mech\->form_number( $number ); \& $mech\->form_name( $name ); \& $mech\->field( $name, $value ); \& $mech\->set_fields( %field_values ); \& $mech\->set_visible( @criteria ); \& $mech\->click( $button ); .Ve .PP WWW::Mechanize is a proper subclass of LWP::UserAgent and you can also use any of LWP::UserAgent's methods. .PP .Vb 1 \& $mech\->add_header($name => $value); .Ve .PP Please note that Mech does \s-1NOT\s0 support JavaScript, you need additional software for that. Please check \*(L"JavaScript\*(R" in WWW::Mechanize::FAQ for more. .SH "IMPORTANT LINKS" .IX Header "IMPORTANT LINKS" .IP "\(bu" 4 <https://github.com/libwww\-perl/WWW\-Mechanize/issues> .Sp The queue for bugs & enhancements in WWW::Mechanize and Test::WWW::Mechanize. Please note that the queue at <http://rt.cpan.org> is no longer maintained. .IP "\(bu" 4 <http://search.cpan.org/dist/WWW\-Mechanize/> .Sp The \s-1CPAN\s0 documentation page for Mechanize. .IP "\(bu" 4 <http://search.cpan.org/dist/WWW\-Mechanize/lib/WWW/Mechanize/FAQ.pod> .Sp Frequently asked questions. Make sure you read here \s-1FIRST.\s0 .SH "CONSTRUCTOR AND STARTUP" .IX Header "CONSTRUCTOR AND STARTUP" .SS "\fInew()\fP" .IX Subsection "new()" Creates and returns a new WWW::Mechanize object, hereafter referred to as the \*(L"agent\*(R". .PP .Vb 1 \& my $mech = WWW::Mechanize\->new() .Ve .PP The constructor for WWW::Mechanize overrides two of the parms to the LWP::UserAgent constructor: .PP .Vb 2 \& agent => \*(AqWWW\-Mechanize/#.##\*(Aq \& cookie_jar => {} # an empty, memory\-only HTTP::Cookies object .Ve .PP You can override these overrides by passing parms to the constructor, as in: .PP .Vb 1 \& my $mech = WWW::Mechanize\->new( agent => \*(Aqwonderbot 1.01\*(Aq ); .Ve .PP If you want none of the overhead of a cookie jar, or don't want your bot accepting cookies, you have to explicitly disallow it, like so: .PP .Vb 1 \& my $mech = WWW::Mechanize\->new( cookie_jar => undef ); .Ve .PP Here are the parms that WWW::Mechanize recognizes. These do not include parms that LWP::UserAgent recognizes. .IP "\(bu" 4 \&\f(CW\*(C`autocheck => [0|1]\*(C'\fR .Sp Checks each request made to see if it was successful. This saves you the trouble of manually checking yourself. Any errors found are errors, not warnings. .Sp The default value is \s-1ON,\s0 unless it's being subclassed, in which case it is \s-1OFF. \s0 This means that standalone WWW::Mechanizeinstances have autocheck turned on, which is protective for the vast majority of Mech users who don't bother checking the return value of \fIget()\fR and \fIpost()\fR and can't figure why their code fails. However, if WWW::Mechanize is subclassed, such as for Test::WWW::Mechanize or Test::WWW::Mechanize::Catalyst, this may not be an appropriate default, so it's off. .IP "\(bu" 4 \&\f(CW\*(C`noproxy => [0|1]\*(C'\fR .Sp Turn off the automatic call to the LWP::UserAgent \f(CW\*(C`env_proxy\*(C'\fR function. .Sp This needs to be explicitly turned off if you're using Crypt::SSLeay to access a https site via a proxy server. Note: you still need to set your \&\s-1HTTPS_PROXY\s0 environment variable as appropriate. .IP "\(bu" 4 \&\f(CW\*(C`onwarn => \e&func\*(C'\fR .Sp Reference to a \f(CW\*(C`warn\*(C'\fR\-compatible function, such as \f(CW\*(C`Carp::carp\*(C'\fR, that is called when a warning needs to be shown. .Sp If this is set to \f(CW\*(C`undef\*(C'\fR, no warnings will ever be shown. However, it's probably better to use the \f(CW\*(C`quiet\*(C'\fR method to control that behavior. .Sp If this value is not passed, Mech uses \f(CW\*(C`Carp::carp\*(C'\fR if Carp is installed, or \f(CW\*(C`CORE::warn\*(C'\fR if not. .IP "\(bu" 4 \&\f(CW\*(C`onerror => \e&func\*(C'\fR .Sp Reference to a \f(CW\*(C`die\*(C'\fR\-compatible function, such as \f(CW\*(C`Carp::croak\*(C'\fR, that is called when there's a fatal error. .Sp If this is set to \f(CW\*(C`undef\*(C'\fR, no errors will ever be shown. .Sp If this value is not passed, Mech uses \f(CW\*(C`Carp::croak\*(C'\fR if Carp is installed, or \f(CW\*(C`CORE::die\*(C'\fR if not. .IP "\(bu" 4 \&\f(CW\*(C`quiet => [0|1]\*(C'\fR .Sp Don't complain on warnings. Setting \f(CW\*(C`quiet => 1\*(C'\fR is the same as calling \f(CW\*(C`$mech\->quiet(1)\*(C'\fR. Default is off. .IP "\(bu" 4 \&\f(CW\*(C`stack_depth => $value\*(C'\fR .Sp Sets the depth of the page stack that keeps track of all the downloaded pages. Default is effectively infinite stack size. If the stack is eating up your memory, then set this to a smaller number, say 5 or 10. Setting this to zero means Mech will keep no history. .PP To support forms, WWW::Mechanize's constructor pushes \s-1POST\s0 on to the agent's \f(CW\*(C`requests_redirectable\*(C'\fR list (see also LWP::UserAgent.) .ie n .SS "$mech\->agent_alias( $alias )" .el .SS "\f(CW$mech\fP\->agent_alias( \f(CW$alias\fP )" .IX Subsection "$mech->agent_alias( $alias )" Sets the user agent string to the expanded version from a table of actual user strings. \&\fI\f(CI$alias\fI\fR can be one of the following: .IP "\(bu" 4 Windows \s-1IE 6\s0 .IP "\(bu" 4 Windows Mozilla .IP "\(bu" 4 Mac Safari .IP "\(bu" 4 Mac Mozilla .IP "\(bu" 4 Linux Mozilla .IP "\(bu" 4 Linux Konqueror .PP then it will be replaced with a more interesting one. For instance, .PP .Vb 1 \& $mech\->agent_alias( \*(AqWindows IE 6\*(Aq ); .Ve .PP sets your User-Agent to .PP .Vb 1 \& Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) .Ve .PP The list of valid aliases can be returned from \f(CW\*(C`known_agent_aliases()\*(C'\fR. The current list is: .IP "\(bu" 4 Windows \s-1IE 6\s0 .IP "\(bu" 4 Windows Mozilla .IP "\(bu" 4 Mac Safari .IP "\(bu" 4 Mac Mozilla .IP "\(bu" 4 Linux Mozilla .IP "\(bu" 4 Linux Konqueror .SS "\fIknown_agent_aliases()\fP" .IX Subsection "known_agent_aliases()" Returns a list of all the agent aliases that Mech knows about. .SH "PAGE-FETCHING METHODS" .IX Header "PAGE-FETCHING METHODS" .ie n .SS "$mech\->get( $uri )" .el .SS "\f(CW$mech\fP\->get( \f(CW$uri\fP )" .IX Subsection "$mech->get( $uri )" Given a \s-1URL/URI,\s0 fetches it. Returns an HTTP::Response object. \&\fI\f(CI$uri\fI\fR can be a well-formed \s-1URL\s0 string, a \s-1URI\s0 object, or a WWW::Mechanize::Link object. .PP The results are stored internally in the agent object, but you don't know that. Just use the accessors listed below. Poking at the internals is deprecated and subject to change in the future. .PP \&\f(CW\*(C`get()\*(C'\fR is a well-behaved overloaded version of the method in LWP::UserAgent. This lets you do things like .PP .Vb 1 \& $mech\->get( $uri, \*(Aq:content_file\*(Aq => $tempfile ); .Ve .PP and you can rest assured that the parms will get filtered down appropriately. .PP \&\fB\s-1NOTE:\s0\fR Because \f(CW\*(C`:content_file\*(C'\fR causes the page contents to be stored in a file instead of the response object, some Mech functions that expect it to be there won't work as expected. Use with caution. .ie n .SS "$mech\->put( $uri, content => $content )" .el .SS "\f(CW$mech\fP\->put( \f(CW$uri\fP, content => \f(CW$content\fP )" .IX Subsection "$mech->put( $uri, content => $content )" PUTs \fI\f(CI$content\fI\fR to \f(CW$uri\fR. Returns an HTTP::Response object. \&\fI\f(CI$uri\fI\fR can be a well-formed \s-1URI\s0 string, a \s-1URI\s0 object, or a WWW::Mechanize::Link object. .ie n .SS "$mech\->\fIreload()\fP" .el .SS "\f(CW$mech\fP\->\fIreload()\fP" .IX Subsection "$mech->reload()" Acts like the reload button in a browser: repeats the current request. The history (as per the \*(L"back\*(R" method) is not altered. .PP Returns the HTTP::Response object from the reload, or \f(CW\*(C`undef\*(C'\fR if there's no current request. .ie n .SS "$mech\->\fIback()\fP" .el .SS "\f(CW$mech\fP\->\fIback()\fP" .IX Subsection "$mech->back()" The equivalent of hitting the \*(L"back\*(R" button in a browser. Returns to the previous page. Won't go back past the first page. (Really, what would it do if it could?) .PP Returns true if it could go back, or false if not. .ie n .SS "$mech\->\fIhistory_count()\fP" .el .SS "\f(CW$mech\fP\->\fIhistory_count()\fP" .IX Subsection "$mech->history_count()" This returns the number of items in the browser history. This number \fIdoes\fR include the most recently made request. .ie n .SS "$mech\->history($n)" .el .SS "\f(CW$mech\fP\->history($n)" .IX Subsection "$mech->history($n)" This returns the \fIn\fRth item in history. The 0th item is the most recent request and response, which would be acted on by methods like \f(CW\*(C`find_link()\*(C'\fR. The 1th item is the state you'd return to if you called \f(CW\*(C`back()\*(C'\fR. .PP The maximum useful value for \f(CW$n\fR is \f(CW\*(C`$mech\->history_count \- 1\*(C'\fR. Requests beyond that bound will return \f(CW\*(C`undef\*(C'\fR. .PP History items are returned as hash references, in the form: .PP .Vb 1 \& { req => $http_request, res => $http_response } .Ve .SH "STATUS METHODS" .IX Header "STATUS METHODS" .ie n .SS "$mech\->\fIsuccess()\fP" .el .SS "\f(CW$mech\fP\->\fIsuccess()\fP" .IX Subsection "$mech->success()" Returns a boolean telling whether the last request was successful. If there hasn't been an operation yet, returns false. .PP This is a convenience function that wraps \f(CW\*(C`$mech\->res\->is_success\*(C'\fR. .ie n .SS "$mech\->\fIuri()\fP" .el .SS "\f(CW$mech\fP\->\fIuri()\fP" .IX Subsection "$mech->uri()" Returns the current \s-1URI\s0 as a \s-1URI\s0 object. This object stringifies to the \s-1URI\s0 itself. .ie n .SS "$mech\->\fIresponse()\fP / $mech\->\fIres()\fP" .el .SS "\f(CW$mech\fP\->\fIresponse()\fP / \f(CW$mech\fP\->\fIres()\fP" .IX Subsection "$mech->response() / $mech->res()" Return the current response as an HTTP::Response object. .PP Synonym for \f(CW\*(C`$mech\->response()\*(C'\fR .ie n .SS "$mech\->\fIstatus()\fP" .el .SS "\f(CW$mech\fP\->\fIstatus()\fP" .IX Subsection "$mech->status()" Returns the \s-1HTTP\s0 status code of the response. This is a 3\-digit number like 200 for \s-1OK, 404\s0 for not found, and so on. .ie n .SS "$mech\->\fIct()\fP / $mech\->\fIcontent_type()\fP" .el .SS "\f(CW$mech\fP\->\fIct()\fP / \f(CW$mech\fP\->\fIcontent_type()\fP" .IX Subsection "$mech->ct() / $mech->content_type()" Returns the content type of the response. .ie n .SS "$mech\->\fIbase()\fP" .el .SS "\f(CW$mech\fP\->\fIbase()\fP" .IX Subsection "$mech->base()" Returns the base \s-1URI\s0 for the current response .ie n .SS "$mech\->\fIforms()\fP" .el .SS "\f(CW$mech\fP\->\fIforms()\fP" .IX Subsection "$mech->forms()" When called in a list context, returns a list of the forms found in the last fetched page. In a scalar context, returns a reference to an array with those forms. The forms returned are all HTML::Form objects. .ie n .SS "$mech\->\fIcurrent_form()\fP" .el .SS "\f(CW$mech\fP\->\fIcurrent_form()\fP" .IX Subsection "$mech->current_form()" Returns the current form as an HTML::Form object. .ie n .SS "$mech\->\fIlinks()\fP" .el .SS "\f(CW$mech\fP\->\fIlinks()\fP" .IX Subsection "$mech->links()" When called in a list context, returns a list of the links found in the last fetched page. In a scalar context it returns a reference to an array with those links. Each link is a WWW::Mechanize::Link object. .ie n .SS "$mech\->\fIis_html()\fP" .el .SS "\f(CW$mech\fP\->\fIis_html()\fP" .IX Subsection "$mech->is_html()" Returns true/false on whether our content is \s-1HTML,\s0 according to the \&\s-1HTTP\s0 headers. .ie n .SS "$mech\->\fItitle()\fP" .el .SS "\f(CW$mech\fP\->\fItitle()\fP" .IX Subsection "$mech->title()" Returns the contents of the \f(CW\*(C`<TITLE>\*(C'\fR tag, as parsed by HTML::HeadParser. Returns undef if the content is not \s-1HTML.\s0 .SH "CONTENT-HANDLING METHODS" .IX Header "CONTENT-HANDLING METHODS" .ie n .SS "$mech\->content(...)" .el .SS "\f(CW$mech\fP\->content(...)" .IX Subsection "$mech->content(...)" Returns the content that the mech uses internally for the last page fetched. Ordinarily this is the same as \&\f(CW\*(C`$mech\->response()\->decoded_content()\*(C'\fR, but this may differ for \s-1HTML\s0 documents if \*(L"update_html\*(R" is overloaded (in which case the value passed to the base-class implementation of same will be returned), and/or extra named arguments are passed to \fI\fIcontent()\fI\fR: .ie n .IP "\fI\fI$mech\fI\->content( format => 'text' )\fR" 2 .el .IP "\fI\f(CI$mech\fI\->content( format => 'text' )\fR" 2 .IX Item "$mech->content( format => 'text' )" Returns a text-only version of the page, with all \s-1HTML\s0 markup stripped. This feature requires \fIHTML::TreeBuilder\fR to be installed, or a fatal error will be thrown. This works only if the contents are \&\s-1HTML.\s0 .ie n .IP "\fI\fI$mech\fI\->content( base_href => [$base_href|undef] )\fR" 2 .el .IP "\fI\f(CI$mech\fI\->content( base_href => [$base_href|undef] )\fR" 2 .IX Item "$mech->content( base_href => [$base_href|undef] )" Returns the \s-1HTML\s0 document, modified to contain a \&\f(CW\*(C`<base href="$base_href">\*(C'\fR mark-up in the header. \&\fI\f(CI$base_href\fI\fR is \f(CW\*(C`$mech\->base()\*(C'\fR if not specified. This is handy to pass the \s-1HTML\s0 to e.g. HTML::Display. This works only if the contents are \s-1HTML.\s0 .ie n .IP "\fI\fI$mech\fI\->content( raw => 1 )\fR" 2 .el .IP "\fI\f(CI$mech\fI\->content( raw => 1 )\fR" 2 .IX Item "$mech->content( raw => 1 )" Returns \f(CW\*(C`$self\->response()\->content()\*(C'\fR, i.e. the raw contents from the response. .ie n .IP "\fI\fI$mech\fI\->content( decoded_by_headers => 1 )\fR" 2 .el .IP "\fI\f(CI$mech\fI\->content( decoded_by_headers => 1 )\fR" 2 .IX Item "$mech->content( decoded_by_headers => 1 )" Returns the content after applying all \f(CW\*(C`Content\-Encoding\*(C'\fR headers but with not additional mangling. .ie n .IP "\fI\fI$mech\fI\->content( charset => \f(CI$charset\fI )\fR" 2 .el .IP "\fI\f(CI$mech\fI\->content( charset => \f(CI$charset\fI )\fR" 2 .IX Item "$mech->content( charset => $charset )" Returns \f(CW\*(C`$self\->response()\->decoded_content(charset => $charset)\*(C'\fR (see HTTP::Response for details). .PP To preserve backwards compatibility, additional parameters will be ignored unless none of \f(CW\*(C`raw | decoded_by_headers | charset\*(C'\fR is specified and the text is \s-1HTML,\s0 in which case an error will be triggered. .ie n .SS "$mech\->\fItext()\fP" .el .SS "\f(CW$mech\fP\->\fItext()\fP" .IX Subsection "$mech->text()" Returns the text of the current \s-1HTML\s0 content. If the content isn't \&\s-1HTML,\s0 \f(CW$mech\fR will die. .PP The text is extracted by parsing the content, and then the extracted text is cached, so don't worry about performance of calling this repeatedly. .SH "LINK METHODS" .IX Header "LINK METHODS" .ie n .SS "$mech\->\fIlinks()\fP" .el .SS "\f(CW$mech\fP\->\fIlinks()\fP" .IX Subsection "$mech->links()" Lists all the links on the current page. Each link is a WWW::Mechanize::Link object. In list context, returns a list of all links. In scalar context, returns an array reference of all links. .ie n .SS "$mech\->follow_link(...)" .el .SS "\f(CW$mech\fP\->follow_link(...)" .IX Subsection "$mech->follow_link(...)" Follows a specified link on the page. You specify the match to be found using the same parms that \f(CW\*(C`find_link()\*(C'\fR uses. .PP Here some examples: .IP "\(bu" 4 3rd link called \*(L"download\*(R" .Sp .Vb 1 \& $mech\->follow_link( text => \*(Aqdownload\*(Aq, n => 3 ); .Ve .IP "\(bu" 4 first link where the \s-1URL\s0 has \*(L"download\*(R" in it, regardless of case: .Sp .Vb 1 \& $mech\->follow_link( url_regex => qr/download/i ); .Ve .Sp or .Sp .Vb 1 \& $mech\->follow_link( url_regex => qr/(?i:download)/ ); .Ve .IP "\(bu" 4 3rd link on the page .Sp .Vb 1 \& $mech\->follow_link( n => 3 ); .Ve .IP "\(bu" 4 the link with the url .Sp .Vb 1 \& $mech\->follow_link( url => \*(Aq/other/page\*(Aq ); .Ve .Sp or .Sp .Vb 1 \& $mech\->follow_link( url => \*(Aqhttp://example.com/page\*(Aq ); .Ve .PP Returns the result of the \s-1GET\s0 method (an HTTP::Response object) if a link was found. If the page has no links, or the specified link couldn't be found, returns undef. .ie n .SS "$mech\->find_link( ... )" .el .SS "\f(CW$mech\fP\->find_link( ... )" .IX Subsection "$mech->find_link( ... )" Finds a link in the currently fetched page. It returns a WWW::Mechanize::Link object which describes the link. (You'll probably be most interested in the \f(CW\*(C`url()\*(C'\fR property.) If it fails to find a link it returns undef. .PP You can take the \s-1URL\s0 part and pass it to the \f(CW\*(C`get()\*(C'\fR method. If that's your plan, you might as well use the \f(CW\*(C`follow_link()\*(C'\fR method directly, since it does the \f(CW\*(C`get()\*(C'\fR for you automatically. .PP Note that \f(CW\*(C`<FRAME SRC="...">\*(C'\fR tags are parsed out of the the \s-1HTML\s0 and treated as links so this method works with them. .PP You can select which link to find by passing in one or more of these key/value pairs: .IP "\(bu" 4 \&\f(CW\*(C`text => \*(Aqstring\*(Aq,\*(C'\fR and \f(CW\*(C`text_regex => qr/regex/,\*(C'\fR .Sp \&\f(CW\*(C`text\*(C'\fR matches the text of the link against \fIstring\fR, which must be an exact match. To select a link with text that is exactly \*(L"download\*(R", use .Sp .Vb 1 \& $mech\->find_link( text => \*(Aqdownload\*(Aq ); .Ve .Sp \&\f(CW\*(C`text_regex\*(C'\fR matches the text of the link against \fIregex\fR. To select a link with text that has \*(L"download\*(R" anywhere in it, regardless of case, use .Sp .Vb 1 \& $mech\->find_link( text_regex => qr/download/i ); .Ve .Sp Note that the text extracted from the page's links are trimmed. For example, \f(CW\*(C`<a> foo </a>\*(C'\fR is stored as 'foo', and searching for leading or trailing spaces will fail. .IP "\(bu" 4 \&\f(CW\*(C`url => \*(Aqstring\*(Aq,\*(C'\fR and \f(CW\*(C`url_regex => qr/regex/,\*(C'\fR .Sp Matches the \s-1URL\s0 of the link against \fIstring\fR or \fIregex\fR, as appropriate. The \s-1URL\s0 may be a relative \s-1URL,\s0 like \fIfoo/bar.html\fR, depending on how it's coded on the page. .IP "\(bu" 4 \&\f(CW\*(C`url_abs => string\*(C'\fR and \f(CW\*(C`url_abs_regex => regex\*(C'\fR .Sp Matches the absolute \s-1URL\s0 of the link against \fIstring\fR or \fIregex\fR, as appropriate. The \s-1URL\s0 will be an absolute \s-1URL,\s0 even if it's relative in the page. .IP "\(bu" 4 \&\f(CW\*(C`name => string\*(C'\fR and \f(CW\*(C`name_regex => regex\*(C'\fR .Sp Matches the name of the link against \fIstring\fR or \fIregex\fR, as appropriate. .IP "\(bu" 4 \&\f(CW\*(C`id => string\*(C'\fR and \f(CW\*(C`id_regex => regex\*(C'\fR .Sp Matches the attribute 'id' of the link against \fIstring\fR or \&\fIregex\fR, as appropriate. .IP "\(bu" 4 \&\f(CW\*(C`class => string\*(C'\fR and \f(CW\*(C`class_regex => regex\*(C'\fR .Sp Matches the attribute 'class' of the link against \fIstring\fR or \&\fIregex\fR, as appropriate. .IP "\(bu" 4 \&\f(CW\*(C`tag => string\*(C'\fR and \f(CW\*(C`tag_regex => regex\*(C'\fR .Sp Matches the tag that the link came from against \fIstring\fR or \fIregex\fR, as appropriate. The \f(CW\*(C`tag_regex\*(C'\fR is probably most useful to check for more than one tag, as in: .Sp .Vb 1 \& $mech\->find_link( tag_regex => qr/^(a|frame)$/ ); .Ve .Sp The tags and attributes looked at are defined below, at \&\*(L"$mech\->\fIfind_link()\fR : link format\*(R". .PP If \f(CW\*(C`n\*(C'\fR is not specified, it defaults to 1. Therefore, if you don't specify any parms, this method defaults to finding the first link on the page. .PP Note that you can specify multiple text or \s-1URL\s0 parameters, which will be ANDed together. For example, to find the first link with text of \*(L"News\*(R" and with \*(L"cnn.com\*(R" in the \s-1URL,\s0 use: .PP .Vb 1 \& $mech\->find_link( text => \*(AqNews\*(Aq, url_regex => qr/cnn\e.com/ ); .Ve .PP The return value is a reference to an array containing a WWW::Mechanize::Link object for every link in \f(CW\*(C`$self\->content\*(C'\fR. .PP The links come from the following: .ie n .IP """<a href=...>""" 4 .el .IP "\f(CW<a href=...>\fR" 4 .IX Item "<a href=...>" .PD 0 .ie n .IP """<area href=...>""" 4 .el .IP "\f(CW<area href=...>\fR" 4 .IX Item "<area href=...>" .ie n .IP """<frame src=...>""" 4 .el .IP "\f(CW<frame src=...>\fR" 4 .IX Item "<frame src=...>" .ie n .IP """<iframe src=...>""" 4 .el .IP "\f(CW<iframe src=...>\fR" 4 .IX Item "<iframe src=...>" .ie n .IP """<link href=...>""" 4 .el .IP "\f(CW<link href=...>\fR" 4 .IX Item "<link href=...>" .ie n .IP """<meta content=...>""" 4 .el .IP "\f(CW<meta content=...>\fR" 4 .IX Item "<meta content=...>" .PD .ie n .SS "$mech\->find_all_links( ... )" .el .SS "\f(CW$mech\fP\->find_all_links( ... )" .IX Subsection "$mech->find_all_links( ... )" Returns all the links on the current page that match the criteria. The method for specifying link criteria is the same as in \f(CW"find_link()"\fR. Each of the links returned is a WWW::Mechanize::Link object. .PP In list context, \f(CW\*(C`find_all_links()\*(C'\fR returns a list of the links. Otherwise, it returns a reference to the list of links. .PP \&\f(CW\*(C`find_all_links()\*(C'\fR with no parameters returns all links in the page. .ie n .SS "$mech\->find_all_inputs( ... criteria ... )" .el .SS "\f(CW$mech\fP\->find_all_inputs( ... criteria ... )" .IX Subsection "$mech->find_all_inputs( ... criteria ... )" \&\fIfind_all_inputs()\fR returns an array of all the input controls in the current form whose properties match all of the regexes passed in. The controls returned are all descended from HTML::Form::Input. .PP If no criteria are passed, all inputs will be returned. .PP If there is no current page, there is no form on the current page, or there are no submit controls in the current form then the return will be an empty array. .PP You may use a regex or a literal string: .PP .Vb 5 \& # get all textarea controls whose names begin with "customer" \& my @customer_text_inputs = $mech\->find_all_inputs( \& type => \*(Aqtextarea\*(Aq, \& name_regex => qr/^customer/, \& ); \& \& # get all text or textarea controls called "customer" \& my @customer_text_inputs = $mech\->find_all_inputs( \& type_regex => qr/^(text|textarea)$/, \& name => \*(Aqcustomer\*(Aq, \& ); .Ve .ie n .SS "$mech\->find_all_submits( ... criteria ... )" .el .SS "\f(CW$mech\fP\->find_all_submits( ... criteria ... )" .IX Subsection "$mech->find_all_submits( ... criteria ... )" \&\f(CW\*(C`find_all_submits()\*(C'\fR does the same thing as \f(CW\*(C`find_all_inputs()\*(C'\fR except that it only returns controls that are submit controls, ignoring other types of input controls like text and checkboxes. .SH "IMAGE METHODS" .IX Header "IMAGE METHODS" .ie n .SS "$mech\->images" .el .SS "\f(CW$mech\fP\->images" .IX Subsection "$mech->images" Lists all the images on the current page. Each image is a WWW::Mechanize::Image object. In list context, returns a list of all images. In scalar context, returns an array reference of all images. .ie n .SS "$mech\->\fIfind_image()\fP" .el .SS "\f(CW$mech\fP\->\fIfind_image()\fP" .IX Subsection "$mech->find_image()" Finds an image in the current page. It returns a WWW::Mechanize::Image object which describes the image. If it fails to find an image it returns undef. .PP You can select which image to find by passing in one or more of these key/value pairs: .IP "\(bu" 4 \&\f(CW\*(C`alt => \*(Aqstring\*(Aq\*(C'\fR and \f(CW\*(C`alt_regex => qr/regex/,\*(C'\fR .Sp \&\f(CW\*(C`alt\*(C'\fR matches the \s-1ALT\s0 attribute of the image against \fIstring\fR, which must be an exact match. To select a image with an \s-1ALT\s0 tag that is exactly \*(L"download\*(R", use .Sp .Vb 1 \& $mech\->find_image( alt => \*(Aqdownload\*(Aq ); .Ve .Sp \&\f(CW\*(C`alt_regex\*(C'\fR matches the \s-1ALT\s0 attribute of the image against a regular expression. To select an image with an \s-1ALT\s0 attribute that has \*(L"download\*(R" anywhere in it, regardless of case, use .Sp .Vb 1 \& $mech\->find_image( alt_regex => qr/download/i ); .Ve .IP "\(bu" 4 \&\f(CW\*(C`url => \*(Aqstring\*(Aq,\*(C'\fR and \f(CW\*(C`url_regex => qr/regex/,\*(C'\fR .Sp Matches the \s-1URL\s0 of the image against \fIstring\fR or \fIregex\fR, as appropriate. The \s-1URL\s0 may be a relative \s-1URL,\s0 like \fIfoo/bar.html\fR, depending on how it's coded on the page. .IP "\(bu" 4 \&\f(CW\*(C`url_abs => string\*(C'\fR and \f(CW\*(C`url_abs_regex => regex\*(C'\fR .Sp Matches the absolute \s-1URL\s0 of the image against \fIstring\fR or \fIregex\fR, as appropriate. The \s-1URL\s0 will be an absolute \s-1URL,\s0 even if it's relative in the page. .IP "\(bu" 4 \&\f(CW\*(C`tag => string\*(C'\fR and \f(CW\*(C`tag_regex => regex\*(C'\fR .Sp Matches the tag that the image came from against \fIstring\fR or \fIregex\fR, as appropriate. The \f(CW\*(C`tag_regex\*(C'\fR is probably most useful to check for more than one tag, as in: .Sp .Vb 1 \& $mech\->find_image( tag_regex => qr/^(img|input)$/ ); .Ve .Sp The tags supported are \f(CW\*(C`<img>\*(C'\fR and \f(CW\*(C`<input>\*(C'\fR. .PP If \f(CW\*(C`n\*(C'\fR is not specified, it defaults to 1. Therefore, if you don't specify any parms, this method defaults to finding the first image on the page. .PP Note that you can specify multiple \s-1ALT\s0 or \s-1URL\s0 parameters, which will be ANDed together. For example, to find the first image with \&\s-1ALT\s0 text of \*(L"News\*(R" and with \*(L"cnn.com\*(R" in the \s-1URL,\s0 use: .PP .Vb 1 \& $mech\->find_image( image => \*(AqNews\*(Aq, url_regex => qr/cnn\e.com/ ); .Ve .PP The return value is a reference to an array containing a WWW::Mechanize::Image object for every image in \f(CW\*(C`$self\->content\*(C'\fR. .ie n .SS "$mech\->find_all_images( ... )" .el .SS "\f(CW$mech\fP\->find_all_images( ... )" .IX Subsection "$mech->find_all_images( ... )" Returns all the images on the current page that match the criteria. The method for specifying image criteria is the same as in \f(CW"find_image()"\fR. Each of the images returned is a WWW::Mechanize::Image object. .PP In list context, \f(CW\*(C`find_all_images()\*(C'\fR returns a list of the images. Otherwise, it returns a reference to the list of images. .PP \&\f(CW\*(C`find_all_images()\*(C'\fR with no parameters returns all images in the page. .SH "FORM METHODS" .IX Header "FORM METHODS" These methods let you work with the forms on a page. The idea is to choose a form that you'll later work with using the field methods below. .ie n .SS "$mech\->forms" .el .SS "\f(CW$mech\fP\->forms" .IX Subsection "$mech->forms" Lists all the forms on the current page. Each form is an HTML::Form object. In list context, returns a list of all forms. In scalar context, returns an array reference of all forms. .ie n .SS "$mech\->form_number($number)" .el .SS "\f(CW$mech\fP\->form_number($number)" .IX Subsection "$mech->form_number($number)" Selects the \fInumber\fRth form on the page as the target for subsequent calls to \f(CW"field()"\fR and \f(CW"click()"\fR. Also returns the form that was selected. .PP If it is found, the form is returned as an HTML::Form object and set internally for later use with Mech's form methods such as \f(CW"field()"\fR and \f(CW"click()"\fR. .PP Emits a warning and returns undef if no form is found. .PP The first form is number 1, not zero. .ie n .SS "$mech\->form_name( $name )" .el .SS "\f(CW$mech\fP\->form_name( \f(CW$name\fP )" .IX Subsection "$mech->form_name( $name )" Selects a form by name. If there is more than one form on the page with that name, then the first one is used, and a warning is generated. .PP If it is found, the form is returned as an HTML::Form object and set internally for later use with Mech's form methods such as \&\f(CW"field()"\fR and \f(CW"click()"\fR. .PP Returns undef if no form is found. .ie n .SS "$mech\->form_id( $name )" .el .SS "\f(CW$mech\fP\->form_id( \f(CW$name\fP )" .IX Subsection "$mech->form_id( $name )" Selects a form by \s-1ID. \s0 If there is more than one form on the page with that \s-1ID,\s0 then the first one is used, and a warning is generated. .PP If it is found, the form is returned as an HTML::Form object and set internally for later use with Mech's form methods such as \&\f(CW"field()"\fR and \f(CW"click()"\fR. .PP If no form is found it returns \f(CW\*(C`undef\*(C'\fR. This will also trigger a warning, unless \f(CW\*(C`quiet\*(C'\fR is enabled. .ie n .SS "$mech\->all_forms_with_fields( @fields )" .el .SS "\f(CW$mech\fP\->all_forms_with_fields( \f(CW@fields\fP )" .IX Subsection "$mech->all_forms_with_fields( @fields )" Selects a form by passing in a list of field names it must contain. All matching forms (perhaps none) are returned as a list of HTML::Form objects. .ie n .SS "$mech\->form_with_fields( @fields )" .el .SS "\f(CW$mech\fP\->form_with_fields( \f(CW@fields\fP )" .IX Subsection "$mech->form_with_fields( @fields )" Selects a form by passing in a list of field names it must contain. If there is more than one form on the page with that matches, then the first one is used, and a warning is generated. .PP If it is found, the form is returned as an HTML::Form object and set internally for later used with Mech's form methods such as \f(CW"field()"\fR and \f(CW"click()"\fR. .PP Returns undef if no form is found. .PP Note that this functionality requires libwww-perl 5.69 or higher. .ie n .SS "$mech\->all_forms_with( $attr1 => $value1, $attr2 => $value2, ... )" .el .SS "\f(CW$mech\fP\->all_forms_with( \f(CW$attr1\fP => \f(CW$value1\fP, \f(CW$attr2\fP => \f(CW$value2\fP, ... )" .IX Subsection "$mech->all_forms_with( $attr1 => $value1, $attr2 => $value2, ... )" Searches for forms with arbitrary attribute/value pairs within the <form> tag. (Currently does not work for attribute \f(CW\*(C`action\*(C'\fR due to implementation details of HTML::Form.) When given more than one pair, all criteria must match. Using \f(CW\*(C`undef\*(C'\fR as value means that the attribute in question may not be present. .PP All matching forms (perhaps none) are returned as a list of HTML::Form objects. .ie n .SS "$mech\->form_with( $attr1 => $value1, $attr2 => $value2, ... )" .el .SS "\f(CW$mech\fP\->form_with( \f(CW$attr1\fP => \f(CW$value1\fP, \f(CW$attr2\fP => \f(CW$value2\fP, ... )" .IX Subsection "$mech->form_with( $attr1 => $value1, $attr2 => $value2, ... )" Searches for forms with arbitrary attribute/value pairs within the <form> tag. (Currently does not work for attribute \f(CW\*(C`action\*(C'\fR due to implementation details of HTML::Form.) When given more than one pair, all criteria must match. Using \f(CW\*(C`undef\*(C'\fR as value means that the attribute in question may not be present. .PP If it is found, the form is returned as an HTML::Form object and set internally for later used with Mech's form methods such as \f(CW"field()"\fR and \f(CW"click()"\fR. .PP Returns undef if no form is found. .SH "FIELD METHODS" .IX Header "FIELD METHODS" These methods allow you to set the values of fields in a given form. .ie n .SS "$mech\->field( $name, $value, $number )" .el .SS "\f(CW$mech\fP\->field( \f(CW$name\fP, \f(CW$value\fP, \f(CW$number\fP )" .IX Subsection "$mech->field( $name, $value, $number )" .ie n .SS "$mech\->field( $name, \e@values, $number )" .el .SS "\f(CW$mech\fP\->field( \f(CW$name\fP, \e@values, \f(CW$number\fP )" .IX Subsection "$mech->field( $name, @values, $number )" Given the name of a field, set its value to the value specified. This applies to the current form (as set by the \*(L"\fIform_name()\fR\*(R" or \&\*(L"\fIform_number()\fR\*(R" method or defaulting to the first form on the page). .PP The optional \fI\f(CI$number\fI\fR parameter is used to distinguish between two fields with the same name. The fields are numbered from 1. .ie n .SS "$mech\->select($name, $value)" .el .SS "\f(CW$mech\fP\->select($name, \f(CW$value\fP)" .IX Subsection "$mech->select($name, $value)" .ie n .SS "$mech\->select($name, \e@values)" .el .SS "\f(CW$mech\fP\->select($name, \e@values)" .IX Subsection "$mech->select($name, @values)" Given the name of a \f(CW\*(C`select\*(C'\fR field, set its value to the value specified. If the field is not \f(CW\*(C`<select multiple>\*(C'\fR and the \&\f(CW$value\fR is an array, only the \fBfirst\fR value will be set. [Note: the documentation previously claimed that only the last value would be set, but this was incorrect.] Passing \f(CW$value\fR as a hash with an \f(CW\*(C`n\*(C'\fR key selects an item by number (e.g. \&\f(CW\*(C`{n => 3}\*(C'\fR or \f(CW\*(C`{n => [2,4]}\*(C'\fR). The numbering starts at 1. This applies to the current form. .PP If you have a field with \f(CW\*(C`<select multiple>\*(C'\fR and you pass a single \&\f(CW$value\fR, then \f(CW$value\fR will be added to the list of fields selected, without clearing the others. However, if you pass an array reference, then all previously selected values will be cleared. .PP Returns true on successfully setting the value. On failure, returns false and calls \f(CW\*(C`$self>warn()\*(C'\fR with an error message. .ie n .SS "$mech\->set_fields( $name => $value ... )" .el .SS "\f(CW$mech\fP\->set_fields( \f(CW$name\fP => \f(CW$value\fP ... )" .IX Subsection "$mech->set_fields( $name => $value ... )" This method sets multiple fields of the current form. It takes a list of field name and value pairs. If there is more than one field with the same name, the first one found is set. If you want to select which of the duplicate field to set, use a value which is an anonymous array which has the field value and its number as the 2 elements. .PP .Vb 2 \& # set the second foo field \& $mech\->set_fields( $name => [ \*(Aqfoo\*(Aq, 2 ] ); .Ve .PP The fields are numbered from 1. .PP This applies to the current form. .ie n .SS "$mech\->set_visible( @criteria )" .el .SS "\f(CW$mech\fP\->set_visible( \f(CW@criteria\fP )" .IX Subsection "$mech->set_visible( @criteria )" This method sets fields of the current form without having to know their names. So if you have a login screen that wants a username and password, you do not have to fetch the form and inspect the source (or use the \fImech-dump\fR utility, installed with WWW::Mechanize) to see what the field names are; you can just say .PP .Vb 1 \& $mech\->set_visible( $username, $password ); .Ve .PP and the first and second fields will be set accordingly. The method is called set_\fIvisible\fR because it acts only on visible fields; hidden form inputs are not considered. The order of the fields is the order in which they appear in the \s-1HTML\s0 source which is nearly always the order anyone viewing the page would think they are in, but some creative work with tables could change that; caveat user. .PP Each element in \f(CW@criteria\fR is either a field value or a field specifier. A field value is a scalar. A field specifier allows you to specify the \fItype\fR of input field you want to set and is denoted with an arrayref containing two elements. So you could specify the first radio button with .PP .Vb 1 \& $mech\->set_visible( [ radio => \*(AqKCRW\*(Aq ] ); .Ve .PP Field values and specifiers can be intermixed, hence .PP .Vb 1 \& $mech\->set_visible( \*(Aqfred\*(Aq, \*(Aqsecret\*(Aq, [ option => \*(AqChecking\*(Aq ] ); .Ve .PP would set the first two fields to \*(L"fred\*(R" and \*(L"secret\*(R", and the \fInext\fR \&\f(CW\*(C`OPTION\*(C'\fR menu field to \*(L"Checking\*(R". .PP The possible field specifier types are: \*(L"text\*(R", \*(L"password\*(R", \*(L"hidden\*(R", \&\*(L"textarea\*(R", \*(L"file\*(R", \*(L"image\*(R", \*(L"submit\*(R", \*(L"radio\*(R", \*(L"checkbox\*(R" and \*(L"option\*(R". .PP \&\f(CW\*(C`set_visible\*(C'\fR returns the number of values set. .ie n .SS "$mech\->tick( $name, $value [, $set] )" .el .SS "\f(CW$mech\fP\->tick( \f(CW$name\fP, \f(CW$value\fP [, \f(CW$set\fP] )" .IX Subsection "$mech->tick( $name, $value [, $set] )" \&\*(L"Ticks\*(R" the first checkbox that has both the name and value associated with it on the current form. Dies if there is no named check box for that value. Passing in a false value as the third optional argument will cause the checkbox to be unticked. .ie n .SS "$mech\->untick($name, $value)" .el .SS "\f(CW$mech\fP\->untick($name, \f(CW$value\fP)" .IX Subsection "$mech->untick($name, $value)" Causes the checkbox to be unticked. Shorthand for \&\f(CW\*(C`tick($name,$value,undef)\*(C'\fR .ie n .SS "$mech\->value( $name [, $number] )" .el .SS "\f(CW$mech\fP\->value( \f(CW$name\fP [, \f(CW$number\fP] )" .IX Subsection "$mech->value( $name [, $number] )" Given the name of a field, return its value. This applies to the current form. .PP The optional \fI\f(CI$number\fI\fR parameter is used to distinguish between two fields with the same name. The fields are numbered from 1. .PP If the field is of type file (file upload field), the value is always cleared to prevent remote sites from downloading your local files. To upload a file, specify its file name explicitly. .ie n .SS "$mech\->click( $button [, $x, $y] )" .el .SS "\f(CW$mech\fP\->click( \f(CW$button\fP [, \f(CW$x\fP, \f(CW$y\fP] )" .IX Subsection "$mech->click( $button [, $x, $y] )" Has the effect of clicking a button on the current form. The first argument is the name of the button to be clicked. The second and third arguments (optional) allow you to specify the (x,y) coordinates of the click. .PP If there is only one button on the form, \f(CW\*(C`$mech\->click()\*(C'\fR with no arguments simply clicks that one button. .PP Returns an HTTP::Response object. .ie n .SS "$mech\->click_button( ... )" .el .SS "\f(CW$mech\fP\->click_button( ... )" .IX Subsection "$mech->click_button( ... )" Has the effect of clicking a button on the current form by specifying its name, value, or index. Its arguments are a list of key/value pairs. Only one of name, number, input or value must be specified in the keys. .IP "\(bu" 4 \&\f(CW\*(C`name => name\*(C'\fR .Sp Clicks the button named \fIname\fR in the current form. .IP "\(bu" 4 \&\f(CW\*(C`id => id\*(C'\fR .Sp Clicks the button with the id \fIid\fR in the current form. .IP "\(bu" 4 \&\f(CW\*(C`number => n\*(C'\fR .Sp Clicks the \fIn\fRth button in the current form. Numbering starts at 1. .IP "\(bu" 4 \&\f(CW\*(C`value => value\*(C'\fR .Sp Clicks the button with the value \fIvalue\fR in the current form. .IP "\(bu" 4 \&\f(CW\*(C`input => $inputobject\*(C'\fR .Sp Clicks on the button referenced by \f(CW$inputobject\fR, an instance of HTML::Form::SubmitInput obtained e.g. from .Sp .Vb 1 \& $mech\->current_form()\->find_input( undef, \*(Aqsubmit\*(Aq ) .Ve .Sp \&\f(CW$inputobject\fR must belong to the current form. .IP "\(bu" 4 \&\f(CW\*(C`x => x\*(C'\fR .IP "\(bu" 4 \&\f(CW\*(C`y => y\*(C'\fR .Sp These arguments (optional) allow you to specify the (x,y) coordinates of the click. .ie n .SS "$mech\->\fIsubmit()\fP" .el .SS "\f(CW$mech\fP\->\fIsubmit()\fP" .IX Subsection "$mech->submit()" Submits the page, without specifying a button to click. Actually, no button is clicked at all. .PP Returns an HTTP::Response object. .PP This used to be a synonym for \f(CW\*(C`$mech\->click( \*(Aqsubmit\*(Aq )\*(C'\fR, but is no longer so. .ie n .SS "$mech\->submit_form( ... )" .el .SS "\f(CW$mech\fP\->submit_form( ... )" .IX Subsection "$mech->submit_form( ... )" This method lets you select a form from the previously fetched page, fill in its fields, and submit it. It combines the form_number/form_name, set_fields and click methods into one higher level call. Its arguments are a list of key/value pairs, all of which are optional. .IP "\(bu" 4 \&\f(CW\*(C`fields => \e%fields\*(C'\fR .Sp Specifies the fields to be filled in the current form. .IP "\(bu" 4 \&\f(CW\*(C`with_fields => \e%fields\*(C'\fR .Sp Probably all you need for the common case. It combines a smart form selector and data setting in one operation. It selects the first form that contains all fields mentioned in \f(CW\*(C`\e%fields\*(C'\fR. This is nice because you don't need to know the name or number of the form to do this. .Sp (calls \f(CW"form_with_fields()"\fR and \f(CW"set_fields()"\fR). .Sp If you choose this, the form_number, form_name, form_id and fields options will be ignored. .IP "\(bu" 4 \&\f(CW\*(C`form_number => n\*(C'\fR .Sp Selects the \fIn\fRth form (calls \f(CW"form_number()"\fR). If this parm is not specified, the currently-selected form is used. .IP "\(bu" 4 \&\f(CW\*(C`form_name => name\*(C'\fR .Sp Selects the form named \fIname\fR (calls \f(CW"form_name()"\fR) .IP "\(bu" 4 \&\f(CW\*(C`form_id => ID\*(C'\fR .Sp Selects the form with \s-1ID \s0\fI\s-1ID\s0\fR (calls \f(CW"form_id()"\fR) .IP "\(bu" 4 \&\f(CW\*(C`button => button\*(C'\fR .Sp Clicks on button \fIbutton\fR (calls \f(CW"click()"\fR) .IP "\(bu" 4 \&\f(CW\*(C`x => x, y => y\*(C'\fR .Sp Sets the x or y values for \f(CW"click()"\fR .IP "\(bu" 4 \&\f(CW\*(C`strict_forms => bool\*(C'\fR .Sp Sets the HTML::Form strict flag which causes form submission to croak if any of the passed fields don't exist on the page, and/or a value doesn't exist in a select element. By default HTML::Form defaults this value to false. .PP If no form is selected, the first form found is used. .PP If \fIbutton\fR is not passed, then the \f(CW"submit()"\fR method is used instead. .PP If you want to submit a file and get its content from a scalar rather than a file in the filesystem, you can use: .PP .Vb 1 \& $mech\->submit_form(with_fields => { logfile => [ [ undef, \*(Aqwhatever\*(Aq, Content => $content ], 1 ] } ); .Ve .PP Returns an HTTP::Response object. .SH "MISCELLANEOUS METHODS" .IX Header "MISCELLANEOUS METHODS" .ie n .SS "$mech\->add_header( name => $value [, name => $value... ] )" .el .SS "\f(CW$mech\fP\->add_header( name => \f(CW$value\fP [, name => \f(CW$value\fP... ] )" .IX Subsection "$mech->add_header( name => $value [, name => $value... ] )" Sets \s-1HTTP\s0 headers for the agent to add or remove from the \s-1HTTP\s0 request. .PP .Vb 1 \& $mech\->add_header( Encoding => \*(Aqtext/klingon\*(Aq ); .Ve .PP If a \fIvalue\fR is \f(CW\*(C`undef\*(C'\fR, then that header will be removed from any future requests. For example, to never send a Referer header: .PP .Vb 1 \& $mech\->add_header( Referer => undef ); .Ve .PP If you want to delete a header, use \f(CW\*(C`delete_header\*(C'\fR. .PP Returns the number of name/value pairs added. .PP \&\fB\s-1NOTE\s0\fR: This method was very different in WWW::Mechanize before 1.00. Back then, the headers were stored in a package hash, not as a member of the object instance. Calling \f(CW\*(C`add_header()\*(C'\fR would modify the headers for every WWW::Mechanize object, even after your object no longer existed. .ie n .SS "$mech\->delete_header( name [, name ... ] )" .el .SS "\f(CW$mech\fP\->delete_header( name [, name ... ] )" .IX Subsection "$mech->delete_header( name [, name ... ] )" Removes \s-1HTTP\s0 headers from the agent's list of special headers. For instance, you might need to do something like: .PP .Vb 2 \& # Don\*(Aqt send a Referer for this URL \& $mech\->add_header( Referer => undef ); \& \& # Get the URL \& $mech\->get( $url ); \& \& # Back to the default behavior \& $mech\->delete_header( \*(AqReferer\*(Aq ); .Ve .ie n .SS "$mech\->quiet(true/false)" .el .SS "\f(CW$mech\fP\->quiet(true/false)" .IX Subsection "$mech->quiet(true/false)" Allows you to suppress warnings to the screen. .PP .Vb 3 \& $mech\->quiet(0); # turns on warnings (the default) \& $mech\->quiet(1); # turns off warnings \& $mech\->quiet(); # returns the current quietness status .Ve .ie n .SS "$mech\->stack_depth( $max_depth )" .el .SS "\f(CW$mech\fP\->stack_depth( \f(CW$max_depth\fP )" .IX Subsection "$mech->stack_depth( $max_depth )" Get or set the page stack depth. Use this if you're doing a lot of page scraping and running out of memory. .PP A value of 0 means \*(L"no history at all.\*(R" By default, the max stack depth is humongously large, effectively keeping all history. .ie n .SS "$mech\->save_content( $filename, %opts )" .el .SS "\f(CW$mech\fP\->save_content( \f(CW$filename\fP, \f(CW%opts\fP )" .IX Subsection "$mech->save_content( $filename, %opts )" Dumps the contents of \f(CW\*(C`$mech\->content\*(C'\fR into \fI\f(CI$filename\fI\fR. \&\fI\f(CI$filename\fI\fR will be overwritten. Dies if there are any errors. .PP If the content type does not begin with \*(L"text/\*(R", then the content is saved in binary mode (i.e. \f(CW\*(C`binmode()\*(C'\fR is set on the output filehandle). .PP Additional arguments can be passed as \fIkey\fR/\fIvalue\fR pairs: .ie n .IP "\fI\fI$mech\fI\->save_content( \f(CI$filename\fI, binary => 1 )\fR" 4 .el .IP "\fI\f(CI$mech\fI\->save_content( \f(CI$filename\fI, binary => 1 )\fR" 4 .IX Item "$mech->save_content( $filename, binary => 1 )" Filehandle is set with \f(CW\*(C`binmode\*(C'\fR to \f(CW\*(C`:raw\*(C'\fR and contents are taken calling \f(CW\*(C`$self\->content(decoded_by_headers => 1)\*(C'\fR. Same as calling: .Sp .Vb 2 \& $mech\->save_content( $filename, binmode => \*(Aq:raw\*(Aq, \& decoded_by_headers => 1 ); .Ve .Sp This \fIshould\fR be the safest way to save contents verbatim. .ie n .IP "\fI\fI$mech\fI\->save_content( \f(CI$filename\fI, binmode => \f(CI$binmode\fI )\fR" 4 .el .IP "\fI\f(CI$mech\fI\->save_content( \f(CI$filename\fI, binmode => \f(CI$binmode\fI )\fR" 4 .IX Item "$mech->save_content( $filename, binmode => $binmode )" Filehandle is set to binary mode. If \f(CW$binmode\fR begins with ':', it is passed as a parameter to \f(CW\*(C`binmode\*(C'\fR: .Sp .Vb 1 \& binmode $fh, $binmode; .Ve .Sp otherwise the filehandle is set to binary mode if \f(CW$binmode\fR is true: .Sp .Vb 1 \& binmode $fh; .Ve .IP "\fIall other arguments\fR" 4 .IX Item "all other arguments" are passed as-is to \f(CW\*(C`$mech\->content(%opts)\*(C'\fR. In particular, \&\f(CW\*(C`decoded_by_headers\*(C'\fR might come handy if you want to revert the effect of line compression performed by the web server but without further interpreting the contents (e.g. decoding it according to the charset). .ie n .SS "$mech\->dump_headers( [$fh] )" .el .SS "\f(CW$mech\fP\->dump_headers( [$fh] )" .IX Subsection "$mech->dump_headers( [$fh] )" Prints a dump of the \s-1HTTP\s0 response headers for the most recent response. If \fI\f(CI$fh\fI\fR is not specified or is undef, it dumps to \&\s-1STDOUT.\s0 .PP Unlike the rest of the dump_* methods, \f(CW$fh\fR can be a scalar. It will be used as a file name. .ie n .SS "$mech\->dump_links( [[$fh], $absolute] )" .el .SS "\f(CW$mech\fP\->dump_links( [[$fh], \f(CW$absolute\fP] )" .IX Subsection "$mech->dump_links( [[$fh], $absolute] )" Prints a dump of the links on the current page to \fI\f(CI$fh\fI\fR. If \fI\f(CI$fh\fI\fR is not specified or is undef, it dumps to \s-1STDOUT.\s0 .PP If \fI\f(CI$absolute\fI\fR is true, links displayed are absolute, not relative. .ie n .SS "$mech\->dump_images( [[$fh], $absolute] )" .el .SS "\f(CW$mech\fP\->dump_images( [[$fh], \f(CW$absolute\fP] )" .IX Subsection "$mech->dump_images( [[$fh], $absolute] )" Prints a dump of the images on the current page to \fI\f(CI$fh\fI\fR. If \fI\f(CI$fh\fI\fR is not specified or is undef, it dumps to \s-1STDOUT.\s0 .PP If \fI\f(CI$absolute\fI\fR is true, links displayed are absolute, not relative. .ie n .SS "$mech\->dump_forms( [$fh] )" .el .SS "\f(CW$mech\fP\->dump_forms( [$fh] )" .IX Subsection "$mech->dump_forms( [$fh] )" Prints a dump of the forms on the current page to \fI\f(CI$fh\fI\fR. If \fI\f(CI$fh\fI\fR is not specified or is undef, it dumps to \s-1STDOUT.\s0 .ie n .SS "$mech\->dump_text( [$fh] )" .el .SS "\f(CW$mech\fP\->dump_text( [$fh] )" .IX Subsection "$mech->dump_text( [$fh] )" Prints a dump of the text on the current page to \fI\f(CI$fh\fI\fR. If \fI\f(CI$fh\fI\fR is not specified or is undef, it dumps to \s-1STDOUT.\s0 .SH "OVERRIDDEN LWP::UserAgent METHODS" .IX Header "OVERRIDDEN LWP::UserAgent METHODS" .ie n .SS "$mech\->\fIclone()\fP" .el .SS "\f(CW$mech\fP\->\fIclone()\fP" .IX Subsection "$mech->clone()" Clone the mech object. The clone will be using the same cookie jar as the original mech. .ie n .SS "$mech\->\fIredirect_ok()\fP" .el .SS "\f(CW$mech\fP\->\fIredirect_ok()\fP" .IX Subsection "$mech->redirect_ok()" An overloaded version of \f(CW\*(C`redirect_ok()\*(C'\fR in LWP::UserAgent. This method is used to determine whether a redirection in the request should be followed. .PP Note that WWW::Mechanize's constructor pushes \s-1POST\s0 on to the agent's \&\f(CW\*(C`requests_redirectable\*(C'\fR list. .ie n .SS "$mech\->request( $request [, $arg [, $size]])" .el .SS "\f(CW$mech\fP\->request( \f(CW$request\fP [, \f(CW$arg\fP [, \f(CW$size\fP]])" .IX Subsection "$mech->request( $request [, $arg [, $size]])" Overloaded version of \f(CW\*(C`request()\*(C'\fR in LWP::UserAgent. Performs the actual request. Normally, if you're using WWW::Mechanize, it's because you don't want to deal with this level of stuff anyway. .PP Note that \f(CW$request\fR will be modified. .PP Returns an HTTP::Response object. .ie n .SS "$mech\->update_html( $html )" .el .SS "\f(CW$mech\fP\->update_html( \f(CW$html\fP )" .IX Subsection "$mech->update_html( $html )" Allows you to replace the \s-1HTML\s0 that the mech has found. Updates the forms and links parse-trees that the mech uses internally. .PP Say you have a page that you know has malformed output, and you want to update it so the links come out correctly: .PP .Vb 3 \& my $html = $mech\->content; \& $html =~ s[</option>.{0,3}</td>][</option></select></td>]isg; \& $mech\->update_html( $html ); .Ve .PP This method is also used internally by the mech itself to update its own \s-1HTML\s0 content when loading a page. This means that if you would like to \fIsystematically\fR perform the above \s-1HTML\s0 substitution, you would overload \fIupdate_html\fR in a subclass thusly: .PP .Vb 2 \& package MyMech; \& use base \*(AqWWW::Mechanize\*(Aq; \& \& sub update_html { \& my ($self, $html) = @_; \& $html =~ s[</option>.{0,3}</td>][</option></select></td>]isg; \& $self\->WWW::Mechanize::update_html( $html ); \& } .Ve .PP If you do this, then the mech will use the tidied-up \s-1HTML\s0 instead of the original both when parsing for its own needs, and for returning to you through \*(L"content\*(R". .PP Overloading this method is also the recommended way of implementing extra validation steps (e.g. link checkers) for every \s-1HTML\s0 page received. \*(L"warn\*(R" and \*(L"die\*(R" would then come in handy to signal validation errors. .ie n .SS "$mech\->credentials( $username, $password )" .el .SS "\f(CW$mech\fP\->credentials( \f(CW$username\fP, \f(CW$password\fP )" .IX Subsection "$mech->credentials( $username, $password )" Provide credentials to be used for \s-1HTTP\s0 Basic authentication for all sites and realms until further notice. .PP The four argument form described in LWP::UserAgent is still supported. .ie n .SS "$mech\->get_basic_credentials( $realm, $uri, $isproxy )" .el .SS "\f(CW$mech\fP\->get_basic_credentials( \f(CW$realm\fP, \f(CW$uri\fP, \f(CW$isproxy\fP )" .IX Subsection "$mech->get_basic_credentials( $realm, $uri, $isproxy )" Returns the credentials for the realm and \s-1URI.\s0 .ie n .SS "$mech\->\fIclear_credentials()\fP" .el .SS "\f(CW$mech\fP\->\fIclear_credentials()\fP" .IX Subsection "$mech->clear_credentials()" Remove any credentials set up with \f(CW\*(C`credentials()\*(C'\fR. .SH "INHERITED UNCHANGED LWP::UserAgent METHODS" .IX Header "INHERITED UNCHANGED LWP::UserAgent METHODS" As a subclass of LWP::UserAgent, WWW::Mechanize inherits all of LWP::UserAgent's methods. Many of which are overridden or extended. The following methods are inherited unchanged. View the LWP::UserAgent documentation for their implementation descriptions. .PP This is not meant to be an inclusive list. \s-1LWP::UA\s0 may have added others. .ie n .SS "$mech\->\fIhead()\fP" .el .SS "\f(CW$mech\fP\->\fIhead()\fP" .IX Subsection "$mech->head()" Inherited from LWP::UserAgent. .ie n .SS "$mech\->\fIpost()\fP" .el .SS "\f(CW$mech\fP\->\fIpost()\fP" .IX Subsection "$mech->post()" Inherited from LWP::UserAgent. .ie n .SS "$mech\->\fImirror()\fP" .el .SS "\f(CW$mech\fP\->\fImirror()\fP" .IX Subsection "$mech->mirror()" Inherited from LWP::UserAgent. .ie n .SS "$mech\->\fIsimple_request()\fP" .el .SS "\f(CW$mech\fP\->\fIsimple_request()\fP" .IX Subsection "$mech->simple_request()" Inherited from LWP::UserAgent. .ie n .SS "$mech\->\fIis_protocol_supported()\fP" .el .SS "\f(CW$mech\fP\->\fIis_protocol_supported()\fP" .IX Subsection "$mech->is_protocol_supported()" Inherited from LWP::UserAgent. .ie n .SS "$mech\->\fIprepare_request()\fP" .el .SS "\f(CW$mech\fP\->\fIprepare_request()\fP" .IX Subsection "$mech->prepare_request()" Inherited from LWP::UserAgent. .ie n .SS "$mech\->\fIprogress()\fP" .el .SS "\f(CW$mech\fP\->\fIprogress()\fP" .IX Subsection "$mech->progress()" Inherited from LWP::UserAgent. .SH "INTERNAL-ONLY METHODS" .IX Header "INTERNAL-ONLY METHODS" These methods are only used internally. You probably don't need to know about them. .ie n .SS "$mech\->_update_page($request, $response)" .el .SS "\f(CW$mech\fP\->_update_page($request, \f(CW$response\fP)" .IX Subsection "$mech->_update_page($request, $response)" Updates all internal variables in \f(CW$mech\fR as if \f(CW$request\fR was just performed, and returns \f(CW$response\fR. The page stack is \fBnot\fR altered by this method, it is up to caller (e.g. \*(L"request\*(R") to do that. .ie n .SS "$mech\->_modify_request( $req )" .el .SS "\f(CW$mech\fP\->_modify_request( \f(CW$req\fP )" .IX Subsection "$mech->_modify_request( $req )" Modifies a HTTP::Request before the request is sent out, for both \s-1GET\s0 and \s-1POST\s0 requests. .PP We add a \f(CW\*(C`Referer\*(C'\fR header, as well as header to note that we can accept gzip encoded content, if Compress::Zlib is installed. .ie n .SS "$mech\->\fI_make_request()\fP" .el .SS "\f(CW$mech\fP\->\fI_make_request()\fP" .IX Subsection "$mech->_make_request()" Convenience method to make it easier for subclasses like WWW::Mechanize::Cached to intercept the request. .ie n .SS "$mech\->\fI_reset_page()\fP" .el .SS "\f(CW$mech\fP\->\fI_reset_page()\fP" .IX Subsection "$mech->_reset_page()" Resets the internal fields that track page parsed stuff. .ie n .SS "$mech\->\fI_extract_links()\fP" .el .SS "\f(CW$mech\fP\->\fI_extract_links()\fP" .IX Subsection "$mech->_extract_links()" Extracts links from the content of a webpage, and populates the \f(CW\*(C`{links}\*(C'\fR property with WWW::Mechanize::Link objects. .ie n .SS "$mech\->\fI_push_page_stack()\fP" .el .SS "\f(CW$mech\fP\->\fI_push_page_stack()\fP" .IX Subsection "$mech->_push_page_stack()" The agent keeps a stack of visited pages, which it can pop when it needs to go \s-1BACK\s0 and so on. .PP The current page needs to be pushed onto the stack before we get a new page, and the stack needs to be popped when \s-1BACK\s0 occurs. .PP Neither of these take any arguments, they just operate on the \f(CW$mech\fR object. .ie n .SS "warn( @messages )" .el .SS "warn( \f(CW@messages\fP )" .IX Subsection "warn( @messages )" Centralized warning method, for diagnostics and non-fatal problems. Defaults to calling \f(CW\*(C`CORE::warn\*(C'\fR, but may be overridden by setting \&\f(CW\*(C`onwarn\*(C'\fR in the constructor. .ie n .SS "die( @messages )" .el .SS "die( \f(CW@messages\fP )" .IX Subsection "die( @messages )" Centralized error method. Defaults to calling \f(CW\*(C`CORE::die\*(C'\fR, but may be overridden by setting \f(CW\*(C`onerror\*(C'\fR in the constructor. .SH "WWW::MECHANIZE'S GIT REPOSITORY" .IX Header "WWW::MECHANIZE'S GIT REPOSITORY" WWW::Mechanize is hosted at GitHub. .PP Repository: <https://github.com/libwww\-perl/WWW\-Mechanize>. Bugs: <https://github.com/libwww\-perl/WWW\-Mechanize/issues>. .SH "OTHER DOCUMENTATION" .IX Header "OTHER DOCUMENTATION" .SS "\fISpidering Hacks\fP, by Kevin Hemenway and Tara Calishain" .IX Subsection "Spidering Hacks, by Kevin Hemenway and Tara Calishain" \&\fISpidering Hacks\fR from O'Reilly (<http://www.oreilly.com/catalog/spiderhks/>) is a great book for anyone wanting to know more about screen-scraping and spidering. .PP There are six hacks that use Mech or a Mech derivative: .IP "#21 WWW::Mechanize 101" 4 .IX Item "#21 WWW::Mechanize 101" .PD 0 .IP "#22 Scraping with WWW::Mechanize" 4 .IX Item "#22 Scraping with WWW::Mechanize" .IP "#36 Downloading Images from Webshots" 4 .IX Item "#36 Downloading Images from Webshots" .IP "#44 Archiving Yahoo! Groups Messages with WWW::Yahoo::Groups" 4 .IX Item "#44 Archiving Yahoo! Groups Messages with WWW::Yahoo::Groups" .IP "#64 Super Author Searching" 4 .IX Item "#64 Super Author Searching" .IP "#73 Scraping \s-1TV\s0 Listings" 4 .IX Item "#73 Scraping TV Listings" .PD .PP The book was also positively reviewed on Slashdot: <http://books.slashdot.org/article.pl?sid=03/12/11/2126256> .SH "ONLINE RESOURCES AND SUPPORT" .IX Header "ONLINE RESOURCES AND SUPPORT" .IP "\(bu" 4 WWW::Mechanize mailing list .Sp The Mech mailing list is at <http://groups.google.com/group/www\-mechanize\-users> and is specific to Mechanize, unlike the \s-1LWP\s0 mailing list below. Although it is a users list, all development discussion takes place here, too. .IP "\(bu" 4 \&\s-1LWP\s0 mailing list .Sp The \s-1LWP\s0 mailing list is at <http://lists.perl.org/showlist.cgi?name=libwww>, and is more user-oriented and well-populated than the WWW::Mechanize list. .IP "\(bu" 4 Perlmonks .Sp <http://perlmonks.org> is an excellent community of support, and many questions about Mech have already been answered there. .IP "\(bu" 4 WWW::Mechanize::Examples .Sp A random array of examples submitted by users, included with the Mechanize distribution. .SH "ARTICLES ABOUT WWW::MECHANIZE" .IX Header "ARTICLES ABOUT WWW::MECHANIZE" .IP "\(bu" 4 <http://www.ibm.com/developerworks/linux/library/wa\-perlsecure/> .Sp \&\s-1IBM\s0 article \*(L"Secure Web site access with Perl\*(R" .IP "\(bu" 4 <http://www.oreilly.com/catalog/googlehks2/chapter/hack84.pdf> .Sp Leland Johnson's hack #84 in \fIGoogle Hacks, 2nd Edition\fR is an example of a production script that uses WWW::Mechanize and HTML::TableContentParser. It takes in keywords and returns the estimated price of these keywords on Google's AdWords program. .IP "\(bu" 4 <http://www.perl.com/pub/a/2004/06/04/recorder.html> .Sp Linda Julien writes about using HTTP::Recorder to create WWW::Mechanize scripts. .IP "\(bu" 4 <http://www.developer.com/lang/other/article.php/3454041> .Sp Jason Gilmore's article on using WWW::Mechanize for scraping sales information from Amazon and eBay. .IP "\(bu" 4 <http://www.perl.com/pub/a/2003/01/22/mechanize.html> .Sp Chris Ball's article about using WWW::Mechanize for scraping \s-1TV\s0 listings. .IP "\(bu" 4 <http://www.stonehenge.com/merlyn/LinuxMag/col47.html> .Sp Randal Schwartz's article on scraping Yahoo News for images. It's already out of date: He manually walks the list of links hunting for matches, which wouldn't have been necessary if the \f(CW\*(C`find_link()\*(C'\fR method existed at press time. .IP "\(bu" 4 <http://www.perladvent.org/2002/16th/> .Sp WWW::Mechanize on the Perl Advent Calendar, by Mark Fowler. .IP "\(bu" 4 <http://www.linux\-magazin.de/Ausgaben/2004/03/Datenruessel/%28language%29/ger\-DE> .Sp Michael Schilli's article on Mech and WWW::Mechanize::Shell for the German magazine \fILinux Magazin\fR. .SS "Other modules that use Mechanize" .IX Subsection "Other modules that use Mechanize" Here are modules that use or subclass Mechanize. Let me know of any others: .IP "\(bu" 4 Finance::Bank::LloydsTSB .IP "\(bu" 4 HTTP::Recorder .Sp Acts as a proxy for web interaction, and then generates WWW::Mechanize scripts. .IP "\(bu" 4 Win32::IE::Mechanize .Sp Just like Mech, but using Microsoft Internet Explorer to do the work. .IP "\(bu" 4 WWW::Bugzilla .IP "\(bu" 4 WWW::CheckSite .IP "\(bu" 4 WWW::Google::Groups .IP "\(bu" 4 WWW::Hotmail .IP "\(bu" 4 WWW::Mechanize::Cached .IP "\(bu" 4 WWW::Mechanize::Cached::GZip .IP "\(bu" 4 WWW::Mechanize::FormFiller .IP "\(bu" 4 WWW::Mechanize::Shell .IP "\(bu" 4 WWW::Mechanize::Sleepy .IP "\(bu" 4 WWW::Mechanize::SpamCop .IP "\(bu" 4 WWW::Mechanize::Timed .IP "\(bu" 4 WWW::SourceForge .IP "\(bu" 4 WWW::Yahoo::Groups .IP "\(bu" 4 WWW::Scripter .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" Thanks to the numerous people who have helped out on WWW::Mechanize in one way or another, including Kirrily Robert for the original \f(CW\*(C`WWW::Automate\*(C'\fR, Lyle Hopkins, Damien Clark, Ansgar Burchardt, Gisle Aas, Jeremy Ary, Hilary Holz, Rafael Kitover, Norbert Buchmuller, Dave Page, David Sainty, H.Merijn Brand, Matt Lawrence, Michael Schwern, Adriano Ferreira, Miyagawa, Peteris Krumins, Rafael Kitover, David Steinbrunner, Kevin Falcone, Mike O'Regan, Mark Stosberg, Uri Guttman, Peter Scott, Phillipe Bruhat, Ian Langworth, John Beppu, Gavin Estey, Jim Brandt, Ask Bjoern Hansen, Greg Davies, Ed Silva, Mark-Jason Dominus, Autrijus Tang, Mark Fowler, Stuart Children, Max Maischein, Meng Wong, Prakash Kailasa, Abigail, Jan Pazdziora, Dominique Quatravaux, Scott Lanning, Rob Casey, Leland Johnson, Joshua Gatcomb, Julien Beasley, Abe Timmerman, Peter Stevens, Pete Krawczyk, Tad McClellan, and the late great Iain Truskett. .SH "AUTHOR" .IX Header "AUTHOR" Andy Lester <andy at petdance.com> .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2004\-2016 by Andy Lester. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Save
cmd:
run