WWW::Mixi::OO::TableListPage - WWW::Mixi::OO's Table style List Pages base class
package WWW::Mixi::OO::Foo; use base qw(WWW::Mixi::OO::TableListPage); # some implementations...
table style list pages base class.
see parent class (WWW::Mixi::OO::ListPage), and some implementation class.
parse previous(or current, or next) navigation.
see some implementation class.
parse title message. return scalar or array of scalar.
these methods used from internal (such as subclass).
cached parser methods for _parse_table, _parse_navi, _parse_body.
# subclass sub _parse_table { my $this = shift; return $this->SUPER::_parse_table(@_) if @_ == 1; # overridable my %options = @_; $this->SUPER::_parse_table(qr/.../); }
return main table.
# subclass sub _split_tables { my ($this, $part) = @_; my @tables = /(...)/g; # set tables $this->cache->{tables} = \@tables; # set indecies to tables... $this->cache->{indecies}->{title} = 0; $this->cache->{indecies}->{navi} = 1; $this->cache->{indecies}->{body} = 2; }
split main tables to some parts.
# call from subclass sub _parse_foo { my ($this, %options) = @_; my $part = $this->parse_table_item_with_index(0); return () unless defined $part; # ... return $1; }
return split part with index. (maybe useless)
# call from subclass sub _parse_body { my ($this, %options) = @_; my $part = $this->parse_table_item('body'); return () unless defined $part; # ... return $1; }
return split part with keyword.
# call from subclass my $table_count = $this->parse_table_items;
return split parts count. (maybe useless)
# call from subclass my %datas = $this->_parse_navi_link('current', 'href="..."', 'next page');
standard navigation link parser.
WWW::Mixi::OO::ListPage, WWW::Mixi::OO::Page
Topia <topia@clovery.jp>
Copyright (C) 2005 by Topia.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install WWW::Mixi::OO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Mixi::OO
CPAN shell
perl -MCPAN -e shell install WWW::Mixi::OO
For more information on module installation, please visit the detailed CPAN module installation guide.