SlideShare a Scribd company logo
1 of 56
Download to read offline
./
!""   repo
#     !"" Changes
#     !"" MANIFEST.SKIP
#     !"" Makefile.PL
#     !"" README
#     !"" lib
#     #   %"" SampleApp.pm
#     !"" t
#     #   %"" 00_compile.t
#     %"" xt
#          !"" 01_podspell.t
#          !"" 02_perlcritic.t
#          !"" 03_pod.t
#          %"" perlcriticrc
%""   sandbox
./lib
!"" SampleApp
#   !"" CLI
#   #   %"" Crawler.pm
#   !"" Role.pm     use Mouse::Role;


#   %"" Web
#       !"" API.pm            use Mouse;
                        with “SampleApp::Role”;


#       %"" Controller
#           %"" Root.pm        $c->model(“API”)->get_entries();


%"" SampleApp.pm
use   LWP::UserAgent;
use   Email::Sender::Simple qw(sendmail);
use   Email::MIME;
use   Try::Tiny;
use   YAML qw(LoadFile);
use   Path::Class qw( file );

my $file = $ARGV[0] || "config.yaml";
die "Can't open $file" unless ( -f file($file)->stringify );
my $config = LoadFile( file($file) );
my $ua = LWP::UserAgent->new( agent => 'Monita/0.01', timeout => 30 );

for my $url ( @{ $config->{url} } ) {
    my $res = $ua->get($url);
    send_report( $res ) unless $res->is_success;
}

sub send_report {
    my $res = shift;
    my $email = Email::MIME->create(
        header => [
             From    => $config->{from},
             To      => $config->{to},
             Subject => $res->request->uri . ' : ' . $res->code,
        ],
        attributes => { content_type => 'text/plain', },
        body        => $res->status_line,
    );
    try { sendmail($email) }
    catch { my $error = $_; warn $error->message };
}
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -

More Related Content

What's hot

Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojobpmedley
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworksdiego_k
 
Inside Bokete: Web Application with Mojolicious and others
Inside Bokete:  Web Application with Mojolicious and othersInside Bokete:  Web Application with Mojolicious and others
Inside Bokete: Web Application with Mojolicious and othersYusuke Wada
 
PerlでWeb API入門
PerlでWeb API入門PerlでWeb API入門
PerlでWeb API入門Yusuke Wada
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101hendrikvb
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked aboutTatsuhiko Miyagawa
 
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)Dotan Dimet
 
Mojolicious: what works and what doesn't
Mojolicious: what works and what doesn'tMojolicious: what works and what doesn't
Mojolicious: what works and what doesn'tCosimo Streppone
 
16.mysql stored procedures in laravel
16.mysql stored procedures in laravel16.mysql stored procedures in laravel
16.mysql stored procedures in laravelRazvan Raducanu, PhD
 
Getting out of Callback Hell in PHP
Getting out of Callback Hell in PHPGetting out of Callback Hell in PHP
Getting out of Callback Hell in PHPArul Kumaran
 
Asynchronous programming patterns in Perl
Asynchronous programming patterns in PerlAsynchronous programming patterns in Perl
Asynchronous programming patterns in Perldeepfountainconsulting
 
Example code for the SADI BMI Calculator Web Service
Example code for the SADI BMI Calculator Web ServiceExample code for the SADI BMI Calculator Web Service
Example code for the SADI BMI Calculator Web ServiceMark Wilkinson
 
Decoupling Objects With Standard Interfaces
Decoupling Objects With Standard InterfacesDecoupling Objects With Standard Interfaces
Decoupling Objects With Standard InterfacesThomas Weinert
 
TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !Matheus Marabesi
 
Undercover Pods / WP Functions
Undercover Pods / WP FunctionsUndercover Pods / WP Functions
Undercover Pods / WP Functionspodsframework
 
Introduction to the Pods JSON API
Introduction to the Pods JSON APIIntroduction to the Pods JSON API
Introduction to the Pods JSON APIpodsframework
 
News of the Symfony2 World
News of the Symfony2 WorldNews of the Symfony2 World
News of the Symfony2 WorldFabien Potencier
 

What's hot (20)

Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojo
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
 
Inside Bokete: Web Application with Mojolicious and others
Inside Bokete:  Web Application with Mojolicious and othersInside Bokete:  Web Application with Mojolicious and others
Inside Bokete: Web Application with Mojolicious and others
 
PerlでWeb API入門
PerlでWeb API入門PerlでWeb API入門
PerlでWeb API入門
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101
 
Developing apps using Perl
Developing apps using PerlDeveloping apps using Perl
Developing apps using Perl
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
 
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
 
Mojolicious: what works and what doesn't
Mojolicious: what works and what doesn'tMojolicious: what works and what doesn't
Mojolicious: what works and what doesn't
 
16.mysql stored procedures in laravel
16.mysql stored procedures in laravel16.mysql stored procedures in laravel
16.mysql stored procedures in laravel
 
Getting out of Callback Hell in PHP
Getting out of Callback Hell in PHPGetting out of Callback Hell in PHP
Getting out of Callback Hell in PHP
 
Asynchronous programming patterns in Perl
Asynchronous programming patterns in PerlAsynchronous programming patterns in Perl
Asynchronous programming patterns in Perl
 
Example code for the SADI BMI Calculator Web Service
Example code for the SADI BMI Calculator Web ServiceExample code for the SADI BMI Calculator Web Service
Example code for the SADI BMI Calculator Web Service
 
Sadi service
Sadi serviceSadi service
Sadi service
 
Laravel the right way
Laravel   the right wayLaravel   the right way
Laravel the right way
 
Decoupling Objects With Standard Interfaces
Decoupling Objects With Standard InterfacesDecoupling Objects With Standard Interfaces
Decoupling Objects With Standard Interfaces
 
TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !
 
Undercover Pods / WP Functions
Undercover Pods / WP FunctionsUndercover Pods / WP Functions
Undercover Pods / WP Functions
 
Introduction to the Pods JSON API
Introduction to the Pods JSON APIIntroduction to the Pods JSON API
Introduction to the Pods JSON API
 
News of the Symfony2 World
News of the Symfony2 WorldNews of the Symfony2 World
News of the Symfony2 World
 

Viewers also liked

エロサイトを作る上での限りなくブラックに近すぎるグレー なバッドノウハウ
エロサイトを作る上での限りなくブラックに近すぎるグレー なバッドノウハウエロサイトを作る上での限りなくブラックに近すぎるグレー なバッドノウハウ
エロサイトを作る上での限りなくブラックに近すぎるグレー なバッドノウハウYusuke Wada
 
いかにしてエロ動画を検索するか GXEB #03
いかにしてエロ動画を検索するか GXEB #03いかにしてエロ動画を検索するか GXEB #03
いかにしてエロ動画を検索するか GXEB #03Yusuke Wada
 
YAPCレポートの舞台裏
YAPCレポートの舞台裏YAPCレポートの舞台裏
YAPCレポートの舞台裏Masahiro Honma
 
テーマ「最適化」
テーマ「最適化」テーマ「最適化」
テーマ「最適化」technocat
 
Takao.mt 2013
Takao.mt 2013Takao.mt 2013
Takao.mt 2013moznion
 
テーマ「なんでもないようなこと」
テーマ「なんでもないようなこと」テーマ「なんでもないようなこと」
テーマ「なんでもないようなこと」technocat
 
理解したつもりになるGit入門
理解したつもりになるGit入門理解したつもりになるGit入門
理解したつもりになるGit入門Yoshihiro Sasaki
 
"Ops Tools with Perl" 2012/05/12 Hokkaido.pm
"Ops Tools with Perl" 2012/05/12 Hokkaido.pm"Ops Tools with Perl" 2012/05/12 Hokkaido.pm
"Ops Tools with Perl" 2012/05/12 Hokkaido.pmRyosuke IWANAGA
 
PHPカンファレンス北海道_20160416
PHPカンファレンス北海道_20160416PHPカンファレンス北海道_20160416
PHPカンファレンス北海道_20160416Yoshihiro Sasaki
 
YAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使う
YAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使うYAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使う
YAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使うmoznion
 
Plack::Request with Encoding
Plack::Request with EncodingPlack::Request with Encoding
Plack::Request with Encodingmoznion
 
Games::* - Perlで 「ゲーム」しよう #hokkaidopm
Games::* - Perlで 「ゲーム」しよう #hokkaidopmGames::* - Perlで 「ゲーム」しよう #hokkaidopm
Games::* - Perlで 「ゲーム」しよう #hokkaidopm鉄次 尾形
 
Google trends to_irc
Google trends to_ircGoogle trends to_irc
Google trends to_ircrarere
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)goccy
 

Viewers also liked (20)

Oppai-Detect 3
Oppai-Detect 3Oppai-Detect 3
Oppai-Detect 3
 
エロサイトを作る上での限りなくブラックに近すぎるグレー なバッドノウハウ
エロサイトを作る上での限りなくブラックに近すぎるグレー なバッドノウハウエロサイトを作る上での限りなくブラックに近すぎるグレー なバッドノウハウ
エロサイトを作る上での限りなくブラックに近すぎるグレー なバッドノウハウ
 
いかにしてエロ動画を検索するか GXEB #03
いかにしてエロ動画を検索するか GXEB #03いかにしてエロ動画を検索するか GXEB #03
いかにしてエロ動画を検索するか GXEB #03
 
YAPCレポートの舞台裏
YAPCレポートの舞台裏YAPCレポートの舞台裏
YAPCレポートの舞台裏
 
テーマ「最適化」
テーマ「最適化」テーマ「最適化」
テーマ「最適化」
 
Takao.mt 2013
Takao.mt 2013Takao.mt 2013
Takao.mt 2013
 
Asset Pipeline for Perl
Asset Pipeline for PerlAsset Pipeline for Perl
Asset Pipeline for Perl
 
テーマ「なんでもないようなこと」
テーマ「なんでもないようなこと」テーマ「なんでもないようなこと」
テーマ「なんでもないようなこと」
 
Currying in perl
Currying in perlCurrying in perl
Currying in perl
 
理解したつもりになるGit入門
理解したつもりになるGit入門理解したつもりになるGit入門
理解したつもりになるGit入門
 
"Ops Tools with Perl" 2012/05/12 Hokkaido.pm
"Ops Tools with Perl" 2012/05/12 Hokkaido.pm"Ops Tools with Perl" 2012/05/12 Hokkaido.pm
"Ops Tools with Perl" 2012/05/12 Hokkaido.pm
 
Using Dancer
Using DancerUsing Dancer
Using Dancer
 
PHPカンファレンス北海道_20160416
PHPカンファレンス北海道_20160416PHPカンファレンス北海道_20160416
PHPカンファレンス北海道_20160416
 
Use Carton
Use CartonUse Carton
Use Carton
 
YAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使う
YAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使うYAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使う
YAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使う
 
Plack::Request with Encoding
Plack::Request with EncodingPlack::Request with Encoding
Plack::Request with Encoding
 
Games::* - Perlで 「ゲーム」しよう #hokkaidopm
Games::* - Perlで 「ゲーム」しよう #hokkaidopmGames::* - Perlで 「ゲーム」しよう #hokkaidopm
Games::* - Perlで 「ゲーム」しよう #hokkaidopm
 
YAPC::AsiaとHokkaido.pm
YAPC::AsiaとHokkaido.pmYAPC::AsiaとHokkaido.pm
YAPC::AsiaとHokkaido.pm
 
Google trends to_irc
Google trends to_ircGoogle trends to_irc
Google trends to_irc
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
 

Similar to エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -

Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Anatoly Sharifulin
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From IusethisMarcus Ramberg
 
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門lestrrat
 
The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of LithiumNate Abele
 
Perl: Hate it for the Right Reasons
Perl: Hate it for the Right ReasonsPerl: Hate it for the Right Reasons
Perl: Hate it for the Right ReasonsMatt Follett
 
Web::Machine - Simpl{e,y} HTTP
Web::Machine - Simpl{e,y} HTTPWeb::Machine - Simpl{e,y} HTTP
Web::Machine - Simpl{e,y} HTTPMichael Francis
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For BeginnersJonathan Wage
 
Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5Elena Kolevska
 
Curscatalyst
CurscatalystCurscatalyst
CurscatalystKar Juan
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overviewYehuda Katz
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
 
Perl web app 테스트전략
Perl web app 테스트전략Perl web app 테스트전략
Perl web app 테스트전략Jeen Lee
 
Advanced modulinos
Advanced modulinosAdvanced modulinos
Advanced modulinosbrian d foy
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the FinishYehuda Katz
 
Silex meets SOAP & REST
Silex meets SOAP & RESTSilex meets SOAP & REST
Silex meets SOAP & RESTHugo Hamon
 
ELK: a log management framework
ELK: a log management frameworkELK: a log management framework
ELK: a log management frameworkGiovanni Bechis
 
Modern Web Development with Perl
Modern Web Development with PerlModern Web Development with Perl
Modern Web Development with PerlDave Cross
 

Similar to エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 - (20)

Perl Web Client
Perl Web ClientPerl Web Client
Perl Web Client
 
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
 
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門
 
The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of Lithium
 
Perl: Hate it for the Right Reasons
Perl: Hate it for the Right ReasonsPerl: Hate it for the Right Reasons
Perl: Hate it for the Right Reasons
 
Web::Machine - Simpl{e,y} HTTP
Web::Machine - Simpl{e,y} HTTPWeb::Machine - Simpl{e,y} HTTP
Web::Machine - Simpl{e,y} HTTP
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
 
Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5
 
Curscatalyst
CurscatalystCurscatalyst
Curscatalyst
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
 
Ruby gems
Ruby gemsRuby gems
Ruby gems
 
Perl web app 테스트전략
Perl web app 테스트전략Perl web app 테스트전략
Perl web app 테스트전략
 
Advanced modulinos
Advanced modulinosAdvanced modulinos
Advanced modulinos
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
 
Silex meets SOAP & REST
Silex meets SOAP & RESTSilex meets SOAP & REST
Silex meets SOAP & REST
 
ELK: a log management framework
ELK: a log management frameworkELK: a log management framework
ELK: a log management framework
 
Modern Web Development with Perl
Modern Web Development with PerlModern Web Development with Perl
Modern Web Development with Perl
 

More from Yusuke Wada

僕がつくった 70個のうちの48個のWebサービス達
僕がつくった 70個のうちの48個のWebサービス達僕がつくった 70個のうちの48個のWebサービス達
僕がつくった 70個のうちの48個のWebサービス達Yusuke Wada
 
スッとGoを取り入れる
スッとGoを取り入れるスッとGoを取り入れる
スッとGoを取り入れるYusuke Wada
 
東京脱出計画中
東京脱出計画中東京脱出計画中
東京脱出計画中Yusuke Wada
 
Extreme remote working
Extreme remote workingExtreme remote working
Extreme remote workingYusuke Wada
 
Podcastを支える技術、エンジニアのためのWebメディア、そしてCPAN
Podcastを支える技術、エンジニアのためのWebメディア、そしてCPANPodcastを支える技術、エンジニアのためのWebメディア、そしてCPAN
Podcastを支える技術、エンジニアのためのWebメディア、そしてCPANYusuke Wada
 
創造のプロセスを回せ!v0.01
創造のプロセスを回せ!v0.01創造のプロセスを回せ!v0.01
創造のプロセスを回せ!v0.01Yusuke Wada
 
It's not only about "REMOTE"
It's not only about "REMOTE"It's not only about "REMOTE"
It's not only about "REMOTE"Yusuke Wada
 
事故からはじまるスケールチャンス
事故からはじまるスケールチャンス事故からはじまるスケールチャンス
事故からはじまるスケールチャンスYusuke Wada
 
Google BigQueryを使ってみた!
Google BigQueryを使ってみた!Google BigQueryを使ってみた!
Google BigQueryを使ってみた!Yusuke Wada
 
Webサービスのコンテンツパターン 或いはデータの活⽤
Webサービスのコンテンツパターン 或いはデータの活⽤Webサービスのコンテンツパターン 或いはデータの活⽤
Webサービスのコンテンツパターン 或いはデータの活⽤Yusuke Wada
 
とある Perl Monger の働き方
とある Perl Monger の働き方とある Perl Monger の働き方
とある Perl Monger の働き方Yusuke Wada
 
5 minutes - YAPC::Asia Tokyo 2014
5 minutes - YAPC::Asia Tokyo 20145 minutes - YAPC::Asia Tokyo 2014
5 minutes - YAPC::Asia Tokyo 2014Yusuke Wada
 
Podcastをカジュアルに 支える技術
Podcastをカジュアルに 支える技術Podcastをカジュアルに 支える技術
Podcastをカジュアルに 支える技術Yusuke Wada
 
The master plan of scaling a web application
The master plan ofscaling a web applicationThe master plan ofscaling a web application
The master plan of scaling a web applicationYusuke Wada
 
そのWebサービスは本当に「あたりまえ」だったのか?
そのWebサービスは本当に「あたりまえ」だったのか?そのWebサービスは本当に「あたりまえ」だったのか?
そのWebサービスは本当に「あたりまえ」だったのか?Yusuke Wada
 
Mojoliciousでつくる! Webアプリ入門
Mojoliciousでつくる! Webアプリ入門Mojoliciousでつくる! Webアプリ入門
Mojoliciousでつくる! Webアプリ入門Yusuke Wada
 
10 things to learn from Bokete
10 things to learn from Bokete10 things to learn from Bokete
10 things to learn from BoketeYusuke Wada
 
僕らの履歴書
僕らの履歴書僕らの履歴書
僕らの履歴書Yusuke Wada
 
僕らがWebサービスをつくる5つの理由
僕らがWebサービスをつくる5つの理由僕らがWebサービスをつくる5つの理由
僕らがWebサービスをつくる5つの理由Yusuke Wada
 
僕らがつくるための 「5W」について
僕らがつくるための 「5W」について僕らがつくるための 「5W」について
僕らがつくるための 「5W」についてYusuke Wada
 

More from Yusuke Wada (20)

僕がつくった 70個のうちの48個のWebサービス達
僕がつくった 70個のうちの48個のWebサービス達僕がつくった 70個のうちの48個のWebサービス達
僕がつくった 70個のうちの48個のWebサービス達
 
スッとGoを取り入れる
スッとGoを取り入れるスッとGoを取り入れる
スッとGoを取り入れる
 
東京脱出計画中
東京脱出計画中東京脱出計画中
東京脱出計画中
 
Extreme remote working
Extreme remote workingExtreme remote working
Extreme remote working
 
Podcastを支える技術、エンジニアのためのWebメディア、そしてCPAN
Podcastを支える技術、エンジニアのためのWebメディア、そしてCPANPodcastを支える技術、エンジニアのためのWebメディア、そしてCPAN
Podcastを支える技術、エンジニアのためのWebメディア、そしてCPAN
 
創造のプロセスを回せ!v0.01
創造のプロセスを回せ!v0.01創造のプロセスを回せ!v0.01
創造のプロセスを回せ!v0.01
 
It's not only about "REMOTE"
It's not only about "REMOTE"It's not only about "REMOTE"
It's not only about "REMOTE"
 
事故からはじまるスケールチャンス
事故からはじまるスケールチャンス事故からはじまるスケールチャンス
事故からはじまるスケールチャンス
 
Google BigQueryを使ってみた!
Google BigQueryを使ってみた!Google BigQueryを使ってみた!
Google BigQueryを使ってみた!
 
Webサービスのコンテンツパターン 或いはデータの活⽤
Webサービスのコンテンツパターン 或いはデータの活⽤Webサービスのコンテンツパターン 或いはデータの活⽤
Webサービスのコンテンツパターン 或いはデータの活⽤
 
とある Perl Monger の働き方
とある Perl Monger の働き方とある Perl Monger の働き方
とある Perl Monger の働き方
 
5 minutes - YAPC::Asia Tokyo 2014
5 minutes - YAPC::Asia Tokyo 20145 minutes - YAPC::Asia Tokyo 2014
5 minutes - YAPC::Asia Tokyo 2014
 
Podcastをカジュアルに 支える技術
Podcastをカジュアルに 支える技術Podcastをカジュアルに 支える技術
Podcastをカジュアルに 支える技術
 
The master plan of scaling a web application
The master plan ofscaling a web applicationThe master plan ofscaling a web application
The master plan of scaling a web application
 
そのWebサービスは本当に「あたりまえ」だったのか?
そのWebサービスは本当に「あたりまえ」だったのか?そのWebサービスは本当に「あたりまえ」だったのか?
そのWebサービスは本当に「あたりまえ」だったのか?
 
Mojoliciousでつくる! Webアプリ入門
Mojoliciousでつくる! Webアプリ入門Mojoliciousでつくる! Webアプリ入門
Mojoliciousでつくる! Webアプリ入門
 
10 things to learn from Bokete
10 things to learn from Bokete10 things to learn from Bokete
10 things to learn from Bokete
 
僕らの履歴書
僕らの履歴書僕らの履歴書
僕らの履歴書
 
僕らがWebサービスをつくる5つの理由
僕らがWebサービスをつくる5つの理由僕らがWebサービスをつくる5つの理由
僕らがWebサービスをつくる5つの理由
 
僕らがつくるための 「5W」について
僕らがつくるための 「5W」について僕らがつくるための 「5W」について
僕らがつくるための 「5W」について
 

Recently uploaded

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Recently uploaded (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. ./ !"" repo #   !"" Changes #   !"" MANIFEST.SKIP #   !"" Makefile.PL #   !"" README #   !"" lib #   #   %"" SampleApp.pm #   !"" t #   #   %"" 00_compile.t #   %"" xt #   !"" 01_podspell.t #   !"" 02_perlcritic.t #   !"" 03_pod.t #   %"" perlcriticrc %"" sandbox
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39. ./lib !"" SampleApp #   !"" CLI #   #   %"" Crawler.pm #   !"" Role.pm use Mouse::Role; #   %"" Web #   !"" API.pm use Mouse; with “SampleApp::Role”; #   %"" Controller #   %"" Root.pm $c->model(“API”)->get_entries(); %"" SampleApp.pm
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48. use LWP::UserAgent; use Email::Sender::Simple qw(sendmail); use Email::MIME; use Try::Tiny; use YAML qw(LoadFile); use Path::Class qw( file ); my $file = $ARGV[0] || "config.yaml"; die "Can't open $file" unless ( -f file($file)->stringify ); my $config = LoadFile( file($file) ); my $ua = LWP::UserAgent->new( agent => 'Monita/0.01', timeout => 30 ); for my $url ( @{ $config->{url} } ) { my $res = $ua->get($url); send_report( $res ) unless $res->is_success; } sub send_report { my $res = shift; my $email = Email::MIME->create( header => [ From => $config->{from}, To => $config->{to}, Subject => $res->request->uri . ' : ' . $res->code, ], attributes => { content_type => 'text/plain', }, body => $res->status_line, ); try { sendmail($email) } catch { my $error = $_; warn $error->message }; }