This file contains hidden or 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/local/bin/perl | |
use strict; | |
use HTTP::MobileAgent; | |
sub foo { | |
local $ENV{HTTP_USER_AGENT} = 'J-PHONE/2.0/J-DN02'; | |
my $agent = HTTP::MobileAgent->new; | |
return $agent->get_header( 'x-jphone-uid' ) unless $agent->is_type_c; | |
} |
This file contains hidden or 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
my $external_enc; | |
if ( $agent->is_docomo ) { | |
$external_enc = "x-sjis-docomo"; | |
} | |
elsif ( $agent->is_ezweb ) { | |
$external_enc = "x-sjis-ezweb-auto"; | |
} | |
elsif ( $agent->is_softbank ) { | |
$external_enc = "x-sjis-softbank-auto"; | |
} |
This file contains hidden or 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
test |
This file contains hidden or 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/local/bin/perl | |
use strict; | |
use warnings; | |
use WWW::Mechanize; | |
use Term::QRCode; | |
my $mech = WWW::Mechanize->new; | |
$mech->get( "http://conferences.yapcasia.org/ya2009/main" ); | |
$mech->submit_form( |
This file contains hidden or 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
;;; tmt-mode.el --- Major mode for editing Text::MicroTemplate syntax | |
;; Copyright (C) 2009 Yoshiki Kurihara | |
;; Author: Yoshiki Kurihara <kurihara at cpan.org> | |
;; Keywords: perl template mode | |
;; This file is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation; either version 2, or (at your option) |
This file contains hidden or 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 MyApp::Config; | |
use strict; | |
use warnings; | |
use base qw( Class::Singleton ); | |
use Config::Any; | |
use Data::Visitor::Callback; | |
use Catalyst::Utils (); | |
use Path::Class; |
This file contains hidden or 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/local/bin/perl | |
use strict; | |
use warnings; | |
use Config::Pit; | |
use HTTP::Headers; | |
use HTTP::Request::Common; | |
use LWP::UserAgent; | |
use AnyEvent::HTTP; | |
use MIME::Base64 qw( encode_base64 ); |
This file contains hidden or 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 Music::DB; | |
use base qw( Hako ); | |
__PACKAGE__->connection( 'dbi:mysql:dbname', 'username', 'password' ); | |
__PACKAGE__->schema( | |
artist => { | |
primary_key => [ qw( id ) ], | |
columns => [ qw( id name ) ], | |
}, | |
cd => { |
This file contains hidden or 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/env perl | |
use strict; | |
use warnings; | |
use DateTime; | |
use DateTime::Format::MySQL; | |
my %age_of = ( | |
0 => '未就学児', | |
6 => '小1', 7 => '小2', 8 => '小3', 9 => '小4', 10 => '小5', 11 => '小6', |
This file contains hidden or 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
#!perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
my $ref = { | |
foo => { | |
qux => { | |
quux => 2, |
OlderNewer