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
$Called = 0; | |
{ | |
package Package1; | |
sub DESTROY { | |
$main::Object1 = $_[0]; | |
$main::Called++; | |
} |
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
get-ugomemo-movies.pl | |
get-ugoletters.pl | |
Save your own ugomemo movies and ugoletters. | |
get-ugomemo-movies.pl requires your API access token. | |
get-ugoletters.pl requires your Hatena OAuth consumer token & secret | |
with the "read_private" scop enabled. |
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
## DOM futures in Perl (experimental) | |
## | |
## Spec: <http://dom.spec.whatwg.org/#futures> | |
use strict; | |
use warnings; | |
package Future; | |
# "queue a task" |
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
sub define_in_lang_methods { | |
my ($class, %args) = @_; | |
my $copies = join "\n", map { | |
$_ . ' => $self->' . $_ . ','; | |
} @{$args{copied_columns} or []}; | |
eval sprintf q{ | |
sub %s::%s { | |
my $self = shift; |
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
['*' => 'HTMLUnknownElement'], | |
['html' => 'HTMLHtmlElement'], | |
['head' => 'HTMLHeadElement'], | |
['title' => 'HTMLTitleElement'], | |
['base' => 'HTMLBaseElement'], | |
['link' => 'HTMLLinkElement'], | |
['meta' => 'HTMLMetaElement'], | |
['style' => 'HTMLStyleElement'], | |
['script' => 'HTMLScriptElement'], |
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
PhantomJS has crashed. Please read the crash reporting guide at https://code.google.com/p/phantomjs/wiki/CrashReporting and file a bug report at https://code.google.com/p/phantomjs/issues/entry with the crash dump file attached: /tmp/3be5dad0-1837-ee46-64d7ad5c-0642c232.dmp |
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 test::fuga; | |
sub DESTROY { | |
warn "fuga->DESTROY called"; | |
} | |
} | |
my $fuga = bless {}, 'test::fuga'; | |
my @hoge; | |
Internals::SvREADONLY (@hoge, 1); |
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 AnyEvent::Util; | |
return sub { | |
return sub { | |
my $writer = $_[0]->([200, []]); | |
AnyEvent::Util::run_cmd(['ls'], '>' => sub { | |
$writer->write($_[0]) if defined $_[0]; | |
$writer->write("Closed\n") unless defined $_[0]; | |
})->cb(sub { | |
$writer->write('End'); |
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 | |
use strict; | |
use warnings; | |
use utf8; | |
use Mojolicious::Lite; | |
use OAuth::Lite::Consumer; | |
use OAuth::Lite::Token; | |
use JSON; |
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
require 'rubygems' | |
require 'sinatra' | |
require 'oauth' | |
require 'erb' | |
require 'json' | |
set :sessions, true | |
enable :sessions | |
before do |