This file contains 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
#!perl | |
use 5.014; | |
use warnings; | |
use lib::abs './Here-Template/lib'; | |
use Here::Template; | |
use Text::Xslate; | |
use Benchmark qw(cmpthese); | |
my %vpath = ( 'test.tx' => <<'XSLATETT' ); | |
Hello, my pid is <: $a :> |
This file contains 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
#!perl | |
use 5.016; | |
use warnings; | |
use Benchmark 'timethese'; | |
use Judy::1 qw/Set Get Count Unset MemUsed/; | |
say 'fill array...'; | |
my %H; | |
my $J; |
This file contains 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/HTML/Tidy.pm b/lib/HTML/Tidy.pm | |
index 079c8a8..26ee3b0 100644 | |
--- a/lib/HTML/Tidy.pm | |
+++ b/lib/HTML/Tidy.pm | |
@@ -228,9 +228,9 @@ sub parse { | |
$self->{config_file}, | |
$self->{tidy_options} | |
); | |
- utf8::decode($errorblock); | |
- |
This file contains 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/HTML/Tidy.pm b/lib/HTML/Tidy.pm | |
index 26ee3b0..6393b00 100644 | |
--- a/lib/HTML/Tidy.pm | |
+++ b/lib/HTML/Tidy.pm | |
@@ -223,7 +223,7 @@ sub parse { | |
} | |
my $html = join( '', @_ ); | |
- utf8::encode($html) unless utf8::is_utf8($html); | |
+ utf8::encode($html) if utf8::is_utf8($html); |
This file contains 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
#!perl | |
use 5.016; | |
use Benchmark qw/timethis/; | |
use BerkeleyDB; | |
use Data::UUID; | |
my $ug = Data::UUID->new; | |
my %h0; | |
my %h1; |
This file contains 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
#!perl | |
while (1) { | |
my $o = bless {}, 'main'; | |
test({}); | |
$o->test; | |
} | |
sub test { &test2; } | |
sub test2 { ref($_[0]) && eval { $_[0]->isa(__PACKAGE__) }; } |
This file contains 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 X::XS; | |
# ... some other code (loading XS in my case) | |
our (%TRACE_PKGS,%TRACE_OBJS,$TRACE_FD); | |
if ($ENV{X_XS_TRACE}) { | |
enable_trace($ENV{X_XS_TRACE}); | |
} |
This file contains 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
#!perl | |
{ | |
package Test; | |
sub new { bless pop||{}, shift; } | |
sub STORABLE_freeze { | |
my ($self) = @_; | |
delete $self->{a}; |
This file contains 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
Sampling process 25086 for 3 seconds with 1 millisecond of run time between samples | |
Sampling completed, processing symbols... | |
Analysis of sampling ruby (pid 25086) every 1 millisecond | |
Process: ruby [25086] | |
Path: /usr/local/Cellar/ruby/2.4.3_1/bin/ruby | |
Load Address: 0x10646e000 | |
Identifier: ruby | |
Version: 0 | |
Code Type: X86-64 | |
Parent Process: zsh [15045] |
This file contains 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
import React from 'react' | |
import { Keyboard, LayoutAnimation, View } from 'react-native' | |
class KeyboardSpacer extends React.Component { | |
constructor (props, ctx) { | |
super(props, ctx) | |
this.subscriptions = [] | |
this.state = { | |
height: 0, | |
} |
OlderNewer