The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

WWW::Mixi::OO::TableListPage - WWW::Mixi::OO's Table style List Pages base class

SYNOPSIS

package WWW::Mixi::OO::Foo;
use base qw(WWW::Mixi::OO::TableListPage);
# some implementations...

DESCRIPTION

table style list pages base class.

METHODS

parse

see parent class (WWW::Mixi::OO::ListPage), and some implementation class.

parse_navi_prev
parse_navi_current
parse_navi_next

parse previous(or current, or next) navigation.

see some implementation class.

METHODS MAYBE IMPLEMENTATION AT SUBCLASS

parse_title

parse title message. return scalar or array of scalar.

INTERNAL METHODS

these methods used from internal (such as subclass).

parse_table
parse_navi
parse_body

cached parser methods for _parse_table, _parse_navi, _parse_body.

_parse_table
# 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.

_split_tables
# 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.

parse_table_item_with_index
# 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)

parse_table_item
# 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.

parse_table_items
# 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.

SEE ALSO

WWW::Mixi::OO::ListPage, WWW::Mixi::OO::Page

AUTHOR

Topia <topia@clovery.jp>

COPYRIGHT AND LICENSE

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.