WWW::Mixi::OO::Page

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

WWW::Mixi::OO::Page Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Topia
  • Publisher web site:
  • http://search.cpan.org/~topia/WWW-Mixi-OO-0.03/lib/WWW/Mixi/OO/ListPage.pm

WWW::Mixi::OO::Page Tags


WWW::Mixi::OO::Page Description

WWW::Mixi::OO::Page is 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...METHODSnew # 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(, ...);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 imageparse_mainmenu my @data = $page->parse_mainmenu;parse mainmenu. structure: link: link to page subject: subject of pageparse_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 imageget $page->get(, ...);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. Requirements: · Perl


WWW::Mixi::OO::Page Related Software