• 
• 
• 
• 
sub run { 
    my $self = shift; 
    my $cv          = AnyEvent‐>condvar; 
    my $feed_reader = AnyEvent::Feed‐>new( 
  ...
• 
     – 
     – 
     – 
• 
• 

• 
     – 




• 
use Noe; #Plack based WAF 
use DBIx::Skinny; 
use Imager; 
use WWW::Favicon; 
use LWP::UserAgent; 
use Cache::Memcached::F...
• 
• 
package MyApp::Controller::Root; 

sub root { 
    my ( $self, $c  ) = @_; 
    $c‐>render('index', { message => $c‐...
• 

• 
• 
• 
• 
     my $rs = $self‐>schema‐>resultset('Link')‐>search( 
        $args, 
        { 
            order_by => 'tweet_count D...
• 
• 

• 
• 
• 
• 
Twib in Yokoahma.pm 2010/3/5
Twib in Yokoahma.pm 2010/3/5
Twib in Yokoahma.pm 2010/3/5
Twib in Yokoahma.pm 2010/3/5
Twib in Yokoahma.pm 2010/3/5
Twib in Yokoahma.pm 2010/3/5
Upcoming SlideShare
Loading in …5
×

Twib in Yokoahma.pm 2010/3/5

1,588
-1

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,588
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
2
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Twib in Yokoahma.pm 2010/3/5

  1. 1. •  •  • 
  2. 2. • 
  3. 3. sub run {      my $self = shift;      my $cv          = AnyEvent‐>condvar;      my $feed_reader = AnyEvent::Feed‐>new(          url      => $self‐>url,          interval => $self‐>interval,          on_fetch => sub {              my ( $feed_reader, $entries, $feed, $error ) = @_;              if ( defined $error ) {                  warn "ERROR: $errorn";                  $cv‐>send;                  return;              }              for (@$entries) {                  my $entry = Twib::CLI::Feed::Entry‐>new( $_‐>[1] );                  if( my $post = $self‐>create_post( $entry ) ){                  }              }          }      );      $cv‐>recv;  } 
  4. 4. •  –  –  –  • 
  5. 5. •  •  –  • 
  6. 6. use Noe; #Plack based WAF  use DBIx::Skinny;  use Imager;  use WWW::Favicon;  use LWP::UserAgent;  use Cache::Memcached::Fast; 
  7. 7. •  •  package MyApp::Controller::Root;  sub root {      my ( $self, $c  ) = @_;      $c‐>render('index', { message => $c‐>config‐>{message} } );  }  sub hi {      my ( $self, $c ) = @_;      my $name = $c‐>req‐>param('name') || 'nanashi';      $c‐>render('hi', { name => $name } );  }  sub redirect {      my ($self, $c ) = @_;      $c‐>redirect( $c‐>base );  }  1; 
  8. 8. •  •  •  •  • 
  9. 9.      my $rs = $self‐>schema‐>resultset('Link')‐>search(          $args,          {              order_by => 'tweet_count DESC',              page     => $page,              rows     => $rows,              prefetch => $prefech,          }      );      if (wantarray) {            my $next_page =              $self‐>schema‐>resultset('Link')              ‐>search( {}, { columns => [qw/me.id/], page => $page + 1,  rows => $rows } )‐>next              ? $page + 1              : 0;            return ( $rs, $next_page );      }      else {          return $rs;      } 
  10. 10. •  •  • 
  11. 11. •  •  • 
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×