Skip to content

Instantly share code, notes, and snippets.

View exodist's full-sized avatar

Chad Granum exodist

View GitHub Profile
package Devel::NeedABetterName;
use strict;
use warnings;
our %files;
our $on;
BEGIN {
# Avoid adding [...] stuff to evals in stack traces
$^P ^= (0x200);
package Devel::Prof;
use strict;
use warnings;
our %files;
no warnings 'redefine';
our $on;
BEGIN { $on = 1 };
@exodist
exodist / error
Created December 18, 2019 01:07
error
[STDOUT] Step 93/106 : RUN PERL_CPANM_OPT="" cpanm /.docker/docker-files/Test2-Harness-1.000000.tar.gz
[STDOUT] ---> Running in 98a5cdbed1cd
[STDOUT] ! Finding /.docker/docker-files/Test2-Harness-1.000000.tar.gz on cpanmetadb failed.
[STDOUT] ! Finding /.docker/docker-files/Test2-Harness-1.000000.tar.gz () on mirror http://www.cpan.org failed.
[STDOUT] ! Couldn't find module or a distribution /.docker/docker-files/Test2-Harness-1.000000.tar.gz
[STDERR] The command '/bin/sh -c PERL_CPANM_OPT="" cpanm /.docker/docker-files/Test2-Harness-1.000000.tar.gz' returned a non-zero code: 1
Can't read /home/exodist/projects/Test2/Test2-Harness/cover_db/digests with Cpanel::JSON::XS: garbage after JSON object, at character offset 34070 (before "|") at /home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.30.0/x86_64-linux/Devel/Cover/DB/IO/JSON.pm line 35, <$fh> chunk 1.
PID: 508335 (506711)
Kill: 0
A: 508335 (506711)
B: 508335 (508335)
wait 0: -1
Kill: 1
child exits 508335 (508335)
wait 0: -1
Kill: 1
got sigchild
@exodist
exodist / fix.pl
Created January 24, 2018 22:40
fix a stamp for postgres
sub format_stamp {
my $stamp = shift;
return undef unless $stamp;
my $out = DateTime->from_epoch(epoch => $stamp)->stringify;
$out .= $1 if sprintf("%.10f", $stamp) =~ m/(\.\d+)$/;
return $out;
}
@exodist
exodist / DepTracer.pm
Last active October 13, 2017 17:25
DepTracer
package DepTracer;
use strict;
use warnings;
use Object::HashBase qw/
-_on
-exclude
-dep_map
-loaded
-my_require
@exodist
exodist / test.pl
Created May 3, 2017 17:21
test.pl
use strict;
use warnings;
use Test::More;
use Test2::API qw/context/;
my @tasks;
sub enqueue(&) {
my $ctx = context(); # Gets the context created by 'is_later'
# Snapshot is safe to pass around, unlike the actual context.
use Test2::Bundle::Extended;
subtest foo => sub {
ok(1);
subtest bar => sub {
ok(1);
subtest baz => sub {
ok(1);
bail_out "xx";
}
while (my $file = readdir($PSGI_DIR)) {
next if $file eq 'dev_dev.psgi';
next if $file =~ m/mock/i;
next unless $file =~ m/^(.*)_dev\.psgi$/;
my $name = $1;
local $@;
$APPS{$name} = eval "package $name; do '$PATH/$file'"
or print STDERR "Failed to load $file: $@";