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 Sample::Web::Handler; | |
use Kamui; | |
use base 'Kamui::Web::Handler'; | |
use Sample::Web::Context; | |
sub context {'Sample::Web::Context'} | |
use Sample::Web::Dispatcher; | |
sub dispatcher {'Sample::Web::Dispatcher'} |
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
#! perl | |
use strict; | |
use warnings; | |
use DBI; | |
use Sys::SigAction qw(set_sig_handler); | |
my $h = set_sig_handler( | |
'ALRM', | |
sub { | |
print "fire\n"; |
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
#! perl | |
use strict; | |
use warnings; | |
use DBI; | |
use Sys::SigAction qw(set_sig_handler); | |
my $h = set_sig_handler( | |
'ALRM', | |
sub { | |
print "fire\n"; |
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
12:06 nekokak: これ俺もよく混乱するんだけど(え | |
12:06 nekokak: このテストケースで使われいるdeflateの設定は | |
12:07 nekokak: 文字列ni | |
12:07 nekokak: に | |
12:07 nekokak: _deflateという文字列を連結してかえすようになってんのね | |
12:07 nekokak: で、updateしたタイミングで "文字列_deflate" という値にしてdbをupdateする | |
12:08 nekokak: refetchでも再度singleでもなんでもいいんだけど同レコードをとりなおしたらレコードの値としては "文字列_deflate"というものがとれる | |
12:09 nekokak: で、$row->name; (nameがinflate/deflate設定されているカラムだとして)するとこの時点ではオブジェクトがとれるんだけど、 | |
12:09 nekokak: $row->name->nameでオブジェクトのメソッドを呼ぶと "文字列_deflate_deflate"になってかえるかんじ | |
12:09 nekokak: なので |
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 DBIx::Handler; | |
use Data::Dumper; | |
unlink './foo.db'; | |
my $handler = DBIx::Handler->new('dbi:SQLite:./foo.db','',''); | |
$handler->dbh->do(q{ | |
create table foo ( | |
id 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 Benchmark qw(:all :hireswallclock); | |
use Data::Dumper; | |
use Test::Mock::Guard qw/mock_guard/; | |
{ | |
package Bench; | |
use parent 'Teng'; |
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 Teng::Plugin::Retrieve; | |
use strict; | |
use warnings; | |
use utf8; | |
our @EXPORT = qw/retrieve/; | |
sub retrieve { | |
my ($self, $table_name, $where, $opt) = @_; |
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
sub single { | |
my ($self, $table_name, $where, $opt) = @_; | |
my $table = $self->{schema}->get_table( $table_name ); | |
Carp::croak("No such table $table_name") unless $table; | |
my $cond_s = |
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
sub hoge { | |
my @caller = caller(0); | |
my $func = $caller[3]; | |
my $code = \&{$func}; | |
warn $code; | |
} |
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
[kobayashi.atsushi@air]$ perl ~/data/cpanm --dpan=~/project/orepan/watchcat --installdeps . [/Users/kobayashi.atsushi/project/WatchCat] 11-07-08 22:21 | |
--> Working on . | |
Configuring WatchCat-0.01 ... OK | |
==> Found dependencies: AnyEvent::IRC | |
--> Working on AnyEvent::IRC | |
Fetching http://search.cpan.org/CPAN/authors/id/E/EL/ELMEX/AnyEvent-IRC-0.96.tar.gz ... OK | |
Configuring AnyEvent-IRC-0.96 ... OK | |
==> Found dependencies: Object::Event | |
--> Working on Object::Event | |
Fetching http://search.cpan.org/CPAN/authors/id/E/EL/ELMEX/Object-Event-1.22.tar.gz ... OK |
NewerOlder