GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  WWW::CONTACT::BASE (3)

.ds Aq ’

NAME

WWW::Contact::Base - Base module for WWW::Contact::*

CONTENTS

SYNOPSIS



    use WWW::Contact::MyMail;
   
    use Moose;
    extends WWW::Contact::Base;
   
    sub get_contacts {
        my ($self, $email, $password) = @_;
       
        # reset
        $self->errstr(undef);
        my @contacts;
       
        my $ua = $self->ua;
        $self->debug("start get_contacts from MyMail");
       
        # get contacts
       
        return wantarray ? @contacts : \@contacts;
    }



DESCRIPTION

This module is mainly for you to write your own WWW::Contact::* (and used in my WWW::Contact::)

METHODS

ua an instance of WWW::Mechanize



    $self->ua->get(http://www.google.com);



If u want to use WWW::Mechanize::* instead of WWW::Mechanize, try



    extends WWW::Contact::Base;
    has +ua_class => ( default => WWW::Mechanize::GZip );



verbose turn on debug, default is off



    $self->verbose(1); # turn on
    $self->verbose(0); # turn off



debug write debug info depends on $self->verbose



    $self->debug("start get_contacts from MyMail");



debug_to_file($file) Dumper(\$self->ua) to $file



    $self->debug_to_file($file)



get a wrapper of $self->ua->get, with $resp->is_success check



    $self->get(http://www.google.com);



submit_form a wrapper of $self->ua->submit_form, with $resp->is_success check



    $self->submit_form(
        form_number => 1,
        fields      => {
            Email  => $email,
            Passwd => $password,
        }
    );



SEE ALSO

WWW::Contact, WWW::Mechanize, Moose

AUTHOR

Fayland Lam, <fayland at gmail.com>

COPYRIGHT & LICENSE

Copyright 2008 Fayland Lam, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 WWW::CONTACT::BASE (3) 2011-09-02

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.