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 strict; | |
use warnings; | |
use Win32::Unicode::Native; | |
use Win32API::File::Time qw(GetFileTime SetFileTime); | |
my $file = "\x{2603}"; # unicode file name (snowman) | |
touch $file or die $! unless file_type f => $file; # create | |
say $file; | |
say "-" x 34 . '+' . '-' x 25; |
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/activeperl | |
$_=q. | |
socierviceal | |
ocialg | |
service | |
.; | |
s.ocial.networkin.g;s.ervice | |
..mixi; |
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 strict; | |
use warnings; | |
use Benchmark qw(cmpthese); | |
my $regexp = qr/test/; | |
my @data = qw(Test foo Baz 2tesT); | |
my @lc_data = map { lc $_ } @data; | |
cmpthese -1 => { | |
ignore => sub { |
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
[client] | |
default-character-set=utf8 | |
key-buffer-size=100K | |
innodb-buffer-pool-size=5M | |
innodb-log-buffer-size=256K | |
innodb-additional-mem-pool-size=512K | |
sort-buffer-size=100K | |
myisam-sort-buffer-size=100K | |
slow-query-log=1 | |
long-query-time=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
Furl::HTTP->new->request( | |
method => 'GET', | |
host => 'example.com', | |
port => 80, | |
path => '/', | |
); | |
# User-Agent: Furl::HTTP/0.32 | |
Furl::HTTP->new(agent => 'gfx')->request( | |
method => 'GET', |
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 strict; | |
use warnings; | |
use AE; | |
use List::Util qw(max); | |
use Data::Dumper; | |
sub sleep_sort { | |
my @args = @_; | |
my (@w, @rv); | |
my $cv = AE::cv; |
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 AnySan; | |
use AnySan::Provider::IRC; | |
use AnyEvent::Twitter; | |
use AnyEvent::Twitter::Stream; | |
use File::Slurp qw(slurp); | |
use JSON qw(decode_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
alarm(2); | |
$SIG{ALRM} = sub { | |
warn 0+$!; | |
}; | |
warn 0+$!; | |
sleep 4; | |
warn 0+$!; | |
alarm(0); | |
__END__ | |
0 at - line 5. |
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
diff --git a/lib/Furl/HTTP.pm b/lib/Furl/HTTP.pm | |
index f1c8226..15da518 100644 | |
--- a/lib/Furl/HTTP.pm | |
+++ b/lib/Furl/HTTP.pm | |
@@ -9,7 +9,7 @@ use Furl; | |
use Furl::ConnectionCache; | |
use Scalar::Util (); | |
-use Errno qw(EAGAIN ECONNRESET EINPROGRESS EINTR EWOULDBLOCK); | |
+use Errno qw(EAGAIN ECONNRESET EINPROGRESS EINTR EWOULDBLOCK ECONNABORTED); |
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 strict; | |
use warnings; | |
use Win32::Unicode; | |
my $dir = '.'; | |
my_find($dir); | |
sub my_find { | |
my ($dir) = @_; |