Skip to content

Instantly share code, notes, and snippets.

View exodist's full-sized avatar

Chad Granum exodist

View GitHub Profile
@exodist
exodist / test.pl
Created February 18, 2016 18:37
caller woes
use strict;
use warnings;
my ($line1, $line2, $line3);
sub foo {
(undef, undef, $line1) = caller(0);
}
$line2 = __LINE__ + 1;
commit 2572a88967feec18b0821c36fcf89813c01cf742
Author: Chad Granum <[email protected]>
Date: Tue Jul 15 23:10:37 2014 -0700
Fix ok() that should be a like()
diff --git a/dist/autouse/t/autouse.t b/dist/autouse/t/autouse.t
index 0c8ad20..74cad59 100644
--- a/dist/autouse/t/autouse.t
+++ b/dist/autouse/t/autouse.t
[Mon Feb 8 09:06:55 2016] starman: Bareword found where operator expected at (eval 457) line 1, near "37b3362::lib::5"
[Mon Feb 8 09:06:55 2016] starman: (Missing operator before b3362::lib::5?)
[Mon Feb 8 09:06:55 2016] starman: Bareword found where operator expected at (eval 457) line 1, near "20.3::Net::libnet"
[Mon Feb 8 09:06:55 2016] starman: (Missing operator before ::Net::libnet?)
[Mon Feb 8 09:06:55 2016] starman: Use of uninitialized value $module in pattern match (m//) at /opt/ndn-perl/2015.12.15.081116-37b3362/lib/site_perl/5.20.3/UNIVERSAL/require.pm line 84.
[Mon Feb 8 09:06:55 2016] starman: Use of uninitialized value $module in concatenation (.) or string at /opt/ndn-perl/2015.12.15.081116-37b3362/lib/site_perl/5.20.3/UNIVERSAL/require.pm line 84.
use strict;
use warnings;
my %stuff = (
a => 1,
b => 2,
c => 3,
);
while (my ($k, $v) = each %stuff) {
@exodist
exodist / list.txt
Created January 24, 2016 05:47
CPAN canary list
Test::Exception
Test::SharedFork
Test::Most
Test::Class
Test::Trap
Test::BDD::Cucumber
Test::Base
Test::Bomb
Test::Class::Moose
Test::Classy
eval <<" EOT" || die $@;
# If the caller has redefine warnings enabled then we want to warn them if
# their import redefines things.
BEGIN { \${^WARNING_BITS} = \$caller->[9] if defined \$caller->[9] };
#line $caller->[2] "$caller->[1]"
(*{"$into\\::\$_"} = \$final{\$_}, push \@{\$Importer::IMPORTED{\$into}} => \$_) for keys %final;
1;
EOT
../ext/B/t/optree_specials.t .. 1/15 # Failed test 3 - BEGIN at t/optree_specials.t line 37
# got 'BEGIN 1:
# a <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq K ->a
# 1 <;> nextstate(B::Concise -910 Concise.pm:301) v:*,&,x*,x&,x$,$ ->2
# 3 <1> require sK/1 ->4
# 2 <$> const[PV "strict.pm"] s/BARE ->3
# - <;> ex-nextstate(B::Concise -910 Concise.pm:301) v:*,&,x*,x&,x$,$ ->4
# - <@> lineseq K ->-
# 4 <;> nextstate(B::Concise -910 Concise.pm:301) :*,&,x*,x&,x$,$ ->5
cc -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c89 -O2 -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings op.c
cc -fstack-protector -L/usr/local/lib -o miniperl \
perlmini.o opmini.o miniperlmain.o gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o caretx.o dquote.o time64.o -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
Can't locate Importer.pm in @INC (you may need to install the Importer module) (@INC contains: lib dist/Exporter/lib /home/exodist/.perlbrew/libs/main@exodist/lib/perl5
use strict;
use warnings;
use Data::Dumper;
use B;
local $! = 1;
my $obj = B::svref_2object(\$!);
print Dumper($obj, $obj->MAGIC->FLAGS);
perl -E 'use Data::Dumper; my ($x, $y) = \("x", "y"); print Dumper($x, $y)'
$VAR1 = \'x';
$VAR2 = \'y';