Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    WWW::Mixi::OO::ListPage 0.03

    Download button

    No screenshots available
    Downloads: 335  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 20th, 2007, 18:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    WWW::Mixi::OO::ListPage description

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


    METHODS

    uri

    see super class (WWW::Mixi::OO::Page).

    this module handle following params:

    page

    page number, maybe 1 origin.

    parse_uri

    see super class (WWW::Mixi::OO::Page).

    this module handle following params:

    page

    page 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, [$pkg]);
    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([opt => val], ...);

    handy method. call ->set_content and ->parse_navi_next.

    get_navi_prev

    # call
    $pkg->get_navi_prev([opt => val], ...);

    handy method. call ->set_content and ->parse_navi_prev.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    WWW::Mixi::OO class | list pages | Perl module | WWW | Perl | class

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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