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 MyProj::Data::DB; | |
use strict; | |
use warnings; | |
use utf8; | |
use DBIx::Sunny::Declare; | |
# export new select* query* master* slave*.. | |
select_row 'member', | |
id => { isa => 'Int', .. }, |
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
Index: t/00base.t | |
=================================================================== | |
--- t/00base.t (revision 38723) | |
+++ t/00base.t (working copy) | |
@@ -1,7 +1,7 @@ | |
use strict; | |
use warnings; | |
-use Test::More tests => 20; | |
+use Test::More tests => 24; |
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/perl | |
package Num; | |
use overload | |
'""' => \&stringfy, | |
'0+' => \&numeric; | |
sub new { | |
my ($class, $value) = @_; |
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
use DBI; | |
use Carp; | |
my $dbh = DBI->connect('dbi:MySQL:test','','', { | |
RaiseError => 1, | |
Callbacks => { | |
ChildCallbacks => { | |
execute___ => sub { | |
my ($obj, @binds) = @_; | |
warn @binds; |
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
#/bin/bash | |
export PERLBREW_ROOT=$HOME/perlbrew | |
export OHOME=$HOME | |
export HOME=/dev/null | |
source $PERLBREW_ROOT/etc/bashrc | |
export HOME=$OHOME | |
__perlbrew_set_path | |
hash -r | |
echo $PATH |
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
--- httpd-2.2.17.orig/modules/metadata/mod_headers.c 2010-08-25 23:12:46.000000000 +0900 | |
+++ httpd-2.2.17/modules/metadata/mod_headers.c 2011-01-28 12:20:10.000000000 +0900 | |
@@ -126,6 +126,7 @@ | |
ap_regex_t *regex; | |
const char *condition_var; | |
const char *subs; | |
+ int use_notes; | |
} header_entry; | |
/* echo_do is used for Header echo to iterate through the request headers*/ |
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 utf8; | |
use 5.12.0; | |
use Text::Xslate; | |
my $templates = { | |
'index' => <<'EOF' |
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 DBI; | |
use Data::Dumper; | |
sub serialize { | |
local $Data::Dumper::Terse = 1; | |
local $Data::Dumper::Indent = 0; |
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 Data::Validator; | |
my $v = Data::Validator->new( | |
limit => 'Int' | |
); | |
$v->validate('foo'); |
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 DBIx::Sunny; | |
use Digest::MurmurHash qw/murmur_hash/; | |
use Text::ASCIITable; | |
use String::Random qw/random_regex/; | |
my $dbh = DBIx::Sunny->connect('dbi:mysql:test'); |