Skip to content

Instantly share code, notes, and snippets.

View Persistent.pm
package Test::mysqld::Persistent;
use strict;
use warnings;
use Test::mysqld;
use JSON;
use File::Spec;
sub new {
my ($class, %args) = @_;
@masaki
masaki / make_sandbox_from_installed_64bit.patch
Created Feb 26, 2014
MySQL::Sandbox make_sandbox_from_installed 64bit patch
View make_sandbox_from_installed_64bit.patch
diff --git a/bin/make_sandbox_from_installed b/bin/make_sandbox_from_installed
index 7b3b5d8..47976c0 100755
--- a/bin/make_sandbox_from_installed
+++ b/bin/make_sandbox_from_installed
@@ -98,8 +98,13 @@ for my $prefix (@prefixes) {
{
$found_install_db =1;
}
- if ( glob("$prefix/lib/mysql/libmysqlclient*")
- or glob( "$prefix/lib/libmysqlclient*") ) {
View rspec.txt
desc 1 before all
cont 1 before all
desc 1 before each
cont 1 before each
exam 1 before
exam 1 after
cont 1 after each
desc 1 after each
cont 1-1 before all
desc 1 before each
View gist:d9f453b04ef07791eca9
diff --git a/lib/App/cpanminus/script.pm b/lib/App/cpanminus/script.pm
index 2d0a845..56c1aa3 100644
--- a/lib/App/cpanminus/script.pm
+++ b/lib/App/cpanminus/script.pm
@@ -1747,7 +1747,7 @@ sub resolve_name {
# Git
if ($module =~ /(?:^git(?:\+\w+)?:|\.git(?:@.+)?$)/) {
- return $self->git_uri($module);
+ return $self->git_uri($module, $version);
View rtmp connect dumper
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin::libs;
use YAML;
use Sniffer::RTMP;
my $dev = $ARGV[0] or die 'require device name';
View gist:49972
my $router = HTTP::Router->define(sub {
$_->with({ controller => 'users' }, sub {
$_->match('/login')->register;
$_->match('/logout')->register;
$_->match('/signup')->register;
});
});
View gist:51460
package MyApp;
__PACKAGE__->request_class('MyApp::Request');
package MyApp::Request;
use strict;
use parent 'Catalyst::Request';
sub method {
View gist:62002
#!/usr/bin/perl
use Data::OpenStruct::Deep;
my %hash = (
foo => 1,
bar => {
baz => 2,
},
);
View gist:74893
diff --git a/lib/Mouse/Meta/Role.pm b/lib/Mouse/Meta/Role.pm
index 95bdca8..fd2fc11 100644
--- a/lib/Mouse/Meta/Role.pm
+++ b/lib/Mouse/Meta/Role.pm
@@ -107,7 +107,20 @@ sub apply {
for my $name ($self->get_attribute_list) {
next if $class->has_attribute($name);
my $spec = $self->get_attribute($name);
- Mouse::Meta::Attribute->create($class, $name, %$spec);
+
@masaki
masaki / gist:78645
Created Mar 13, 2009
ShipIt with Git
View gist:78645
diff --git a/lib/ShipIt/VC/Git.pm b/lib/ShipIt/VC/Git.pm
index 9bf21d7..b5b6c2c 100644
--- a/lib/ShipIt/VC/Git.pm
+++ b/lib/ShipIt/VC/Git.pm
@@ -61,6 +61,18 @@ sub commit {
print $tmp_fh $msg;
my $tmp_fn = "$tmp_fh";
system($command, "commit", "-a", "-F", $tmp_fn);
+
+ if (my $where = $self->{push_to}) {