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; | |
package aaa; | |
sub foo { print "A\n" } | |
package aab; | |
sub foo { print "B\n" } | |
package main; |
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; | |
package uplevel; | |
use Sub::Uplevel; | |
use Carp qw/cluck/; | |
#line 10 | |
sub a { cluck "XXX" }; | |
sub b { a('a') } |
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; | |
my $count = 4; | |
while (1) { | |
print "loop: " . (5 - $count) . "\n"; | |
no warnings 'void'; | |
$count-- xor next if $count; |
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 Carp qw/longmess/; | |
use B; | |
my @STASH; | |
sub set_sub_name { | |
my ($name, $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
use strict; | |
use warnings; | |
use B; | |
sub simple { | |
print "A"; | |
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 Test::More; | |
use Scalar::Util qw/reftype/; | |
sub redact { | |
my ($thing, $replace, @fix) = @_; | |
my %seen; | |
my @stack = ($thing); | |
while (@stack) { |
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 Test::Stream -V1, Compare => '*'; | |
is( | |
{ a => 'foo', b => 'bar' }, | |
hash { | |
field a => match qr/fox/; | |
field b => match qr/box/; | |
}, | |
"Sample" | |
); |
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
commit 9f39a706c009646a5876cf205c8b6c13b7445e28 | |
Author: Chad Granum <[email protected]> | |
Date: Sat Sep 26 22:40:04 2015 -0700 | |
Capabilities: detect bad 5.10.0 threads | |
diff --git a/lib/Test/Stream/Capabilities.pm b/lib/Test/Stream/Capabilities.pm | |
index 4e65ff9..27b8cae 100644 | |
--- a/lib/Test/Stream/Capabilities.pm | |
+++ b/lib/Test/Stream/Capabilities.pm |
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
$ tracepath -m200 bad.horse | |
[...] | |
8: t00.nycmc1.ny.us.sn11.net 101.570ms | |
9: bad.horse 102.077ms asymm 12 | |
10: bad.horse 106.139ms asymm 12 | |
11: bad.horse 108.322ms asymm 12 | |
12: bad.horse 116.249ms | |
13: he.rides.across.the.nation 121.157ms | |
14: the.thoroughbred.of.sin 126.335ms | |
15: he.got.the.application 131.509ms |
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; | |
sub do_it { | |
my $x = 1; | |
$x++ while caller($x); | |
print "Doin' it (Depth: $x)\n"; | |
eval "END { do_it; exit }; 1 "|| die $@; | |
} |