Skip to content

Instantly share code, notes, and snippets.

use strict;
use warnings;
use Test::More;
my $x = 'x'x(1024*1024*10);
while (1) {
ok($x, $x);
}
use strict;
use warnings;
use DBI;
use YAML;
my $dbh = DBI->connect('DBI:SQLite:');
#my $dbh = DBI->connect('DBI:mysql:test');
$dbh->do('CREATE TABLE hyoshiok ( dan BIGINT, kogai BIGINT )');
sub insert {
@yappo
yappo / gist:176111
Created August 27, 2009 05:51 — forked from imakado/gist:176075
(defun perl-insert-package ()
(interactive)
(require 'perl-completion)
(cond
((null buffer-file-truename) (error "no buffer-file-truename"))
(t
(let* ((s (replace-regexp-in-string
(rx-to-string `(and bol ,(plcmp--get-lib-path) (? "/")))
""
(expand-file-name buffer-file-truename)))
use strict;
use warnings;
use Benchmark ':all';
use LWP::Simple;
use Cache::Memcached::Fast;
my $mc = Cache::Memcached::Fast->new({ servers => [ 'localhost:12321' ] });
cmpthese(10000, {
use strict;
use warnings;
use Benchmark ':all';
use LWP::Simple;
use Cache::Memcached::Fast;
use WWW::Curl::Easy;
use WWW::Curl::Share;
# PlackupTest.pm
package PlackupTest;
use strict;
use warnings;
use Plack::Up;
use Plack::Response;
sub hanlder {
my $req = shift;
my $body = qq{
# PlackupTest.pm
package PlackupTest;
use strict;
use warnings;
use Plack::Response;
sub hanlder {
my $req = shift;
my $body = qq{
<h1>Welcome To Ksk World.</h1>
package Cat;
use strict;
use warnings;
use Data::Dumper;
sub new { bless {}, shift }
sub handler {
sub {
[ 200, [ 'Content-Type' => 'text/plain' ], [ Dumper(\@_) ] ];
}
@yappo
yappo / gist:188421
Created September 17, 2009 09:28 — forked from mattn/gist:188420
mattn: さいたまさいたまー?
@yappo
yappo / gist:188424
Created September 17, 2009 09:32 — forked from mattn/gist:188422
mattn: さいたまさいたまー?
いえ、ちがいます
すいません、どうやら人違いでした。