This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Role; | |
use 5.10.0; | |
use Mouse::Role; | |
use Data::Validator; | |
use DB; | |
sub args { | |
{ | |
package DB; | |
() = caller(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use MyApp; | |
use Test::JSON::RPC::Autodoc; | |
my $psgi = MyApp->new(); | |
my $test = Test::JSON::RPC::Autodoc->new({ | |
document_root => '/docs', | |
app => $psgi->to_app() | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$VAR1 = { | |
'AudioSampleRate' => 44100, | |
'Flags' => 2, | |
'ImageWidth' => 720, | |
'AudioCodecDescription' => '128 kbps, 44 kHz, stereo (A/V) 1-pass CBR', | |
'FileSize (1)' => '1308 MB', | |
'CreationDate' => '2007:08:23 05:04:12Z', | |
'ErrorCorrectionType' => 'No Error Correction', | |
'Author' => 'DMM', | |
'MIMEType' => 'video/x-ms-wmv', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Moose; | |
use CGI; | |
use DateTime::Duration; | |
use URI; | |
use Web::Scraper; | |
our $VERSION = '0.01'; | |
has 'url' => ( is => 'rw', isa => 'Str', required => 1 ); | |
has 'id' => ( is => 'rw', isa => 'Int' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use FindBin; | |
use File::Spec; | |
use Config::YAML; | |
use DBIx::Class::Schema::Loader qw/make_schema_at/; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use CGI; | |
use URI; | |
use Web::Scraper; | |
use XML::OPML; | |
my $q = CGI->new; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get videos list by channel from woopie.jp | |
use WebService::Simple; | |
my $channel_id = shift || '6212'; | |
my $woopie = WebService::Simple->new( | |
base_url => "http://www.woopie.jp/api/getChannelVideos", | |
response_parser => 'JSON', | |
); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use CGI; | |
use LWP::UserAgent; | |
my $q = CGI->new; | |
print $q->header( -type=> 'text/html', -charset=> 'utf-8'); | |
my $id = "sm6120845"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<embed type="application/x-shockwave-flash" id="external_nico_0" name="external_nico_0" src="http://ext.nicovideo.jp/swf/thumbwatch.swf?ts=1232974801&thumbWatch=1&playerTimestamp=1235633000&v=sm6120845&thumbTitle=%E3%80%90%E4%BF%BA%E6%A7%98%E3%81%AE%E9%89%B1%E7%89%A9%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80%E3%81%8C%E6%BD%AE%E5%90%B9%E3%81%8F%E3%81%9C%EF%BC%81%E3%80%91&thumbDescription=%E7%8F%A0%E7%8E%89%E3%81%AE%E9%89%B1%E7%89%A9%E6%A8%99%E6%9C%AC%E7%94%BB%E5%83%8F%E9%9B%86%20%20%E6%9E%9A%E6%95%B0%E8%A9%B0%E3%82%81%E8%BE%BC%E3%81%BF%E3%81%99%E3%81%8E%E3%81%BE%E3%81%97%E3%81%9F%E3%80%81%E3%81%94%E3%82%81%E3%82%93%E3%81%AA%E3%81%95%E3%81%84%20%20%E9%89%B1%E7%89%A9%E8%90%8C%E3%81%88%E3%81%A3%E3%81%A6%E3%80%81%E5%A4%89%E6%85%8B%E3%81%8B%E3%81%97%E3%82%89%EF%BC%9F%20%20%20%20%E3%81%93%E3%81%AE%E5%8B%95%E7%94%BB%E3%81%8C%E3%81%8D%E3%81%A3%E3%81%8B%E3%81%91%E3%81%A7%E9%89%B1...&thumbImage=http%3A%2F%2Ftn-skr2.smilevideo.jp%2Fsmile%3Fi%3D6120845&thumbWidth=485&thumbHeight=385&mylist_co |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# author: yusukebe | |
sub handle { | |
my ($self, $url) = @_; | |
$url =~ qr!www.veoh.com/.*?watch.*?v[0-9a-zA-Z]{14,16}$!; | |
} | |
sub find { | |
my ($self, $args) = @_; | |
$args->{url} =~ /(v[0-9a-zA-Z]{14,16})$/; |
OlderNewer