Skip to content

Instantly share code, notes, and snippets.

@INC:
/home/xaicron/perl5/perlbrew/perls/perl-5.16.2/lib/site_perl/5.16.3/x86_64-linux
/home/xaicron/perl5/perlbrew/perls/perl-5.16.2/lib/site_perl/5.16.3
/home/xaicron/perl5/perlbrew/perls/perl-5.16.2/lib/5.16.3/x86_64-linux
/home/xaicron/perl5/perlbrew/perls/perl-5.16.2/lib/5.16.3
/home/xaicron/perl5/perlbrew/perls/perl-5.16.2/lib/site_perl/5.16.2/x86_64-linux
/home/xaicron/perl5/perlbrew/perls/perl-5.16.2/lib/site_perl/5.16.2
/home/xaicron/perl5/perlbrew/perls/perl-5.16.2/lib/site_perl
.
diff --git a/lib/Furl.pm b/lib/Furl.pm
index 85678ab..9b19860 100644
--- a/lib/Furl.pm
+++ b/lib/Furl.pm
@@ -15,17 +15,6 @@ sub new {
bless \(Furl::HTTP->new(header_format => Furl::HTTP::HEADERS_AS_HASHREF(), @_)), $class;
}
-{
- no strict 'refs';
package Object;
sub new {
bless {}, __PACKAGE__;
}
sub DESTROY {
eval {};
}
#!/usr/bin/env perl
package Plack::Request::URIClone;
use parent 'Plack::Request';
sub uri {
my $self = shift;
$self->{_uri} ||= $self->SUPER::uri();
$self->{_uri}->clone;
@xaicron
xaicron / gist:3490145
Created August 27, 2012 16:32
install-capnm
#!/bin/sh
set -e
HTTP_GET_COMMAND=""
if [ `which curl` ]; then
HTTP_GET_COMMAND="curl -L"
elif [ `which wget` ]; then
HTTP_GET_COMMAND="wget -O -"
elif [ `perl -v | grep "5.1[3-9]"` ]; then
HTTP_GET_COMMAND="perl -MHTTP::Tiny -e 'print +HTTP::Tiny->new->get(shift)->{content}'"
#!/usr/bin/env perl
use strict;
use warnings;
use File::Zglob;
use Getopt::Long;
use Pod::Usage;
our $VERSION=$File::Zglob::VERSION;
package Foo::Handle;
use strict;
use warnings;
sub TIEHANDLE {
my ($class, $handle) = @_;
bless \$handle, $class;
}
sub PRINT {
# ------------------------------------------------------------------------------
# hoge
# ------------------------------------------------------------------------------
Undefined subroutine &main::piyo called at a.t line 5.
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
Test Summary Report
-------------------
a.t (Wstat: 65280 Tests: 0 Failed: 0)
my $got_str = _dd($got)."\n";
my $expects_str = _dd($expects)."\n";
if (length $got_str > 10000 && length $expects_str > 10000) {
require Test::Differences;
Test::Differences::eq_or_diff($got, $expects);
return;
}
ok $got_str eq $expects_str, $desc or do {
note String::Diff::diff($got_str, $expects_str, (
remove_open => color('black on_red'),
@xaicron
xaicron / border.js
Created June 10, 2012 17:17
canvas border line
var JSX = {};
(function () {
/**
* copies the implementations from source interface to target
*/
function $__jsx_merge_interface(target, source) {
for (var k in source.prototype)
if (source.prototype.hasOwnProperty(k))
target.prototype[k] = source.prototype[k];