WWW::Mixi::OO::ListPageWWW::Mixi::OO::ListPage is a WWW::Mixi::OO's List Pages base class. | |
Download |
WWW::Mixi::OO::ListPage Ranking & Summary
Advertisement
- 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::ListPage Tags
WWW::Mixi::OO::ListPage Description
WWW::Mixi::OO::ListPage is a WWW::Mixi::OO's List Pages base class. WWW::Mixi::OO::ListPage is a WWW::Mixi::OO's List Pages base class.SYNOPSIS package WWW::Mixi::OO::Foo; use base qw(WWW::Mixi::OO::ListPage); # some implementations...METHODSurisee super class (WWW::Mixi::OO::Page).this module handle following params:pagepage number, maybe 1 origin.parse_urisee super class (WWW::Mixi::OO::Page).this module handle following params:pagepage number, maybe 1 origin.parse_navi_next # subclass sub parse_navi_next { my ($this, %options) = @_; # parse... $this->content =~ /.../; # return return { a => b, c => d }; } # call my $next = $pkg->parse_navi_next;page "next" navi parser. please return hashref. page didn't have next page navigation, no need to implement this.parse_navi_prev # subclass sub parse_navi_prev { my ($this, %options) = @_; # parse... $this->content =~ /.../; # return return { a => b, c => d }; } # call my $prev = $pkg->parse_navi_prev;page "prev" navi parser. please return hashref. page didn't have previous page navigation, no need to implement this.fetch # call $pkg->fetch( limit => $limit, other_options... );fetch all items from some pages. need ->get and ->parse_navi_next()->{link}.gen_sort_proc # call $pkg->gen_sort_proc($spec, );generate sort closure(anonsub).spec is "$field" or "!$field"(reverse order).sort # call $pkg->sort($spec, @items...);handy sort function. (but maybe need unnecessarily array copy...)sort_type # subclass sub sort_type { my ($this, $field) = @_; if (grep { $_ eq $field } qw(more nums...)) { return 'num'; } else { return $this->SUPER::sort_type($field); } }sort type probe function.get_navi_next # call $pkg->get_navi_next(, ...);handy method. call ->set_content and ->parse_navi_next.get_navi_prev # call $pkg->get_navi_prev(, ...);handy method. call ->set_content and ->parse_navi_prev. Requirements: · Perl
WWW::Mixi::OO::ListPage Related Software