Skip to content

Instantly share code, notes, and snippets.

View lopnor's full-sized avatar

Nobuo Danjou lopnor

View GitHub Profile
 
\s\(.+?文庫\)
\s.+?文庫$
^新装版[\s・]
^小説\s
\s限定版.?$
\s(岩波|文春)文庫\s.+$
\s全.冊.{0,}$
[<\<\[\(【〈(].+?[<\>\]\))〉】].{0,}$
\s\(.+?\)$
\s\(.+?文庫\)
#!perl
use strict;
use warnings;
use Encode;
binmode(STDOUT, ':utf8');
my $title = decode('utf-8', shift);
open my $fh, '<:utf8', 'regex.txt';
while (my $str = <$fh>) {
#!perl
use strict;
use warnings;
use lib 'lib';
use Config::Pit;
use BrowseNodeLookup;
binmode(STDOUT, ':utf8');
my $nodeid = shift;
my $conf = pit_get('amazon.co.jp');
#!perl
use strict;
use warnings;
use lib 'lib';
use BrowseNodeLookup;
use Config::Pit;
binmode(STDOUT, ':utf8');
my $conf = pit_get('amazon.co.jp');
package BrowseNodeLookup;
use LWP::UserAgent;
use Net::Amazon;
use URI;
use XML::LibXML;
sub new {
my ($class, $conf) = @_;
my $self = bless {}, $class;
#!perl
use strict;
use warnings;
use Imager;
use File::Basename;
my $dir = shift;
my $savedir = "$dir/cropped";
-r $savedir or mkdir $savedir;
for my $subdir (glob("$dir/*")) {
#!perl
use strict;
use warnings;
use URI;
use Web::Scraper;
use HTML::Element;
use YAML;
my $rdfa = scraper {
process '//link[@rel="alternate"][@media="handheld"]', 'mobile', '@href';
diff --git a/lib/Ark/Plugin/Authentication/Credential/OpenID.pm b/lib/Ark/Plugin/Authentication/Credential/OpenID.pm
index 4c890d3..9b12c0f 100644
--- a/lib/Ark/Plugin/Authentication/Credential/OpenID.pm
+++ b/lib/Ark/Plugin/Authentication/Credential/OpenID.pm
@@ -21,8 +21,8 @@ around authenticate => sub {
my $c = $self->context;
my $claimed_uri = $c->req->method eq 'GET'
- ? $c->req->query_params->{openid_identifier}
- : $c->req->body_params->{openid_identifier};
#!perl
use strict;
use warnings;
use utf8;
use Config::Pit;
use WebService::Simple;
{
package MyParser;
use base 'WebService::Simple::Parser';