<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    WWW::Mooos::Scraper - Mooos scraper module

VERSION
    0.02

SYNOPSIS
      use WWW::Mooos::Scraper;
      use strict;

      my $mooos = WWW::Mooos::Scraper-&gt;new;
      my $res = $mooos-&gt;readers(page =&gt; 1);
      if(exists $res-&gt;{error}){
        die $res-&gt;{error};
      }
  
      foreach my $article(@{$res-&gt;{recent_articles}}){
    
         while(my($key, $val) = each %{$article}){
            printf "%-15s %s\n", $key, $val;
         }
      }

DESCRIPTION
    Mooos is open message boards service.

    It scrapes the content of this site.

    URL http://www.mooos.net/

METHOD
  new
    Create instance

    Option:

      time_zone : your location time zone(default: Asia/Tokyo)

    Example:

      my $mooos = WWW::Mooos::Scraper-&gt;new;

  entry
    It enters it in url that wants to comment

    Options:

      comment    : comment(require, utf8 string. but no utf8flag)
      entry_type : positive or negative(require)
      url        : url(require)

    Example:

      my $res = $mooos-&gt;entry( comment =&gt; "comment string", entry_type =&gt; "positive", url =&gt; "http://your.want.to.comment.url/" );
      if(exists $res-&gt;{error}){
        # error trap!
        print Dumper($res);
        exit;
      }elsif(exists $res-&gt;{success}){
        # success. do something...
      }

  readers
    Get recent 10 articles

    Option:

      page : page number(default 1)

    Example:

      my $res = $mooos-&gt;readers( page =&gt; 1 );
      if(exists $res-&gt;{error}){
         # error trap!
         print Dumper($res);
         exit;
      }
  
      foreach my $article(@{$res-&gt;{recent_articles}}){
    
        print "page_title: " . $article-&gt;{page_title} . "\n";
        print "page_url: " . $article-&gt;{page_url} . "\n";             # URI instance
        print "total_comments: " . $article-&gt;{total_comments} . "\n";
        print "mooos_page_url: " . $article-&gt;{mooos_page_url} . "\n"; # URI instance
        print "positive_count: " . $article-&gt;{positive_count} . "\n";
        print "negative_count: " . $article-&gt;{negative_count} . "\n";
        print "entry_time: " . $article-&gt;{entry_time} . "\n";         # DateTime instance
        print "last_comment: " . $article-&gt;{last_comment} . "\n";
        print "last_comment_type: " . $article-&gt;{last_comment_type} . "\n";
        print "-" x 50;
        print "\n";
      }

    hot_comments method is readers method alias.

      # same $mooos-&gt;reader result
      my $res = $mooos-&gt;hot_comments( page =&gt; 1 );

  new_comments
    Get recent 10 comment

    Option:

      page : page number(default 1)

    Example:

      my $res = $mooos-&gt;new_comments( page =&gt; 1 );
      if(exists $res-&gt;{error}){
         # error trap!
         print Dumper($res);
         exit;
      }
  
      foreach my $comment(@{$res-&gt;{new_comments}}){
    
        print "page_title: " . $comment-&gt;{page_title} . "\n";
        print "page_url: " . $comment-&gt;{page_url} . "\n";             # URI instance
        print "comment_num: " . $comment-&gt;{comment_num} . "\n";
        print "mooos_page_url: " . $comment-&gt;{mooos_page_url} . "\n"; # URI instance
        print "entry_time: " . $comment-&gt;{entry_time} . "\n";         # DateTime instance
        print "comment: " . $comment-&gt;{comment} . "\n";
        print "entry_type: " . $comment-&gt;{entry_type} . "\n";
        print "-" x 50;
        print "\n";
      }

  search
    Get url search

    Option:

      page : page number(default 1)
      url  : url(require)

    Example:

      my $res = $mooos-&gt;search( page =&gt; 1, url =&gt; "http://your.want.to.search.url/" );
      if(exists $res-&gt;{error}){
         # error trap!
         print Dumper($res);
         exit;
      }
  
      print "page_title: " . $res-&gt;{page_title} . "\n";
      print "page_url: " . $res-&gt;{page_url} . "\n";             # URI instance
      print "thumbnail_url: " . $res-&gt;{thumbnail_url} . "\n";   # URI instance
      print "comment_num: " . $res-&gt;{comment_num} . "\n";
      foreach my $comment(@{$res-&gt;{article_comments}}){
    
        print "comment: " . $comment-&gt;{comment} . "\n";
        print "entry_time: " . $comment-&gt;{entry_time} . "\n";       # DateTime instance
        print "entry_type: " . $comment-&gt;{entry_type} . "\n";
        print "-" x 50;
        print "\n";
      }

ACCESSOR METHOD
  time_zone
    Get/Set your location time zone

    Example:

      $mooos-&gt;time_zone("Asia/Taipei");
      $time_zone = $mooos-&gt;time_zone;

  time
    Get timestamp

    Example:

      $time = $mooos-&gt;time;

SEE ALSO
    Class::Accessor Readonly Sub::Install UNIVERSAL::require

AUTHOR
    Akira Horimoto

COPYRIGHT AND LICENSE
    This library is free software. You can redistribute it and/or modify it
    under the same terms as perl itself.

    Copyright (C) 2007 Akira Horimoto

</pre></body></html>