Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    WWW::Mixi::OO::Page 0.03

    Download button

    No screenshots available
    Downloads: 327  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Topia | More programs
    Perl Artistic License / FREE
    August 18th, 2007, 21:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    WWW::Mixi::OO::Page description

    A WWW::Mixi::OO's Pages base class.

    WWW::Mixi::OO::Page is a WWW::Mixi::OO's Pages base class.

    SYNOPSIS

    package WWW::Mixi::OO::Foo;
    use base qw(WWW::Mixi::OO::Page);
    sub uri {
    shift->absolute_uri('foo.pl');
    }
    # some implementations...


    METHODS

    new
    # subclass
    sub new {
    my $this = shift->SUPER::new(@_);
    # some initializations...
    }

    # call
    my $page = $pkg->new($session);

    constructor of page. please override if you need some initializations.

    uri
    # subclass
    sub uri {
    my ($this, %options) = @_;
    $this->SUPER::uri(_path => 'foo',
    _params => {
    a => b,
    },
    %options);
    }

    # call
    my $uri = $page->uri([opt => val], ...);
    return URI of page.

    parse_uri
    # subclass
    sub parse_uri {
    my ($this, $data, %options) = @_;
    $this->copy_hash_val($data->{params}, %options, 'page');
    if ($data->{path} eq "show_friend") {
    # blah...
    }
    if ($data->{uri}->...) {
    # maybe you won't use this
    }
    $this->SUPER::uri($data, %options);
    }

    # call
    my %options = $page->analyze_uri($uri);
    return page information of URI.

    parse
    # subclass
    sub parse {
    my ($this, %options) = @_;
    # parse...
    my $part = $this->parse_extract_parts(qw/.../);
    return () unless defined $part;
    # return
    return ({ a => b, c => d }, { a => e, c => f }, ...);
    }

    # call
    my @datas = $page->parse;
    page parser. please return hashref array.

    parse_banner
    my $data = $page->parse_banner;
    parse banner. structure:
    link: link to ad page.
    subject: subject of ad(banner's alt text).
    image: image of banner
    height: height of image
    width: width of image
    parse_mainmenu
    my @data = $page->parse_mainmenu;
    parse mainmenu. structure:
    link: link to page
    subject: subject of page
    parse_tool_bar
    my @data = $page->parse_tool_bar;
    parse toolbar. structure:
    link: link to page
    subject: subject of page
    image: image of toolbar.
    height: height of image
    width: width of image
    get
    $page->get([opt => val], ...);
    handy method. call ->set_content and ->parse.
    set_content
    $page->set_content($uri);
    or
    $page->set_content(%options);
    set content to specified by uri or options.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    WWW::Mixi::OO Pages | Perl class | Perl module | WWW::Mixi::OO | Pages | Perl

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM