Skip to content

Instantly share code, notes, and snippets.

View tobyink's full-sized avatar
🦈
hi

Toby Inkster tobyink

🦈
hi
View GitHub Profile
$ p5u deps
# RUNTIME
Carp 0
Data::Clone 0
Exporter 0
File::Basename 0
File::Spec 0
File::Temp 0
List::Util 0
Number::Compare 0.02
@tobyink
tobyink / perl-popcon.pl
Created March 14, 2013 12:55
Reports the names of CPAN distributions installed on the current Perl.
use v5.10;
use strict;
use warnings;
use aliased "Path::Tiny" => "Path";
use aliased "Path::Iterator::Rule";
use aliased "JSON";
my @dists;
@tobyink
tobyink / build.log
Last active May 6, 2019 15:51
Trying to install NoSQL::PL2SQL on a clean Perl 5.12.5...
cpanm (App::cpanminus) 1.5006 on perl 5.012005 built for i686-linux-thread-multi
Work directory is /home/tai/.cpanm/work/1363363212.13296
You have make /usr/bin/make
You have /usr/bin/wget
You have /bin/tar: tar (GNU tar) 1.26
Copyright © 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
use v5.14;
use Test::More tests => 1;
package RRR {
use Moo::Role;
around BUILDARGS => sub { ::pass("got here") };
}
package CCC {
use Moo;
package Local::Overloaded {
use overload
'&{}' => sub { sub { print "ok\n" } },
fallback => 1;
}
package Local::Class {
use Moo;
has a => (is => "ro", isa => bless([], "Local::Overloaded"));
}
use v5.14;
{
package QueryListExtended;
use Moose;
extends 'Class::MOP::Class';
sub get_all_attributes_names
{
use v5.14;
use Benchmark qw(cmpthese);
{
package Antlers;
use Moose;
has a => (is => "rw");
__PACKAGE__->meta->make_immutable;
our $o = __PACKAGE__->new(a => 1);
}
use Data::Dumper;
use Types::Standard qw(-types slurpy);
use Type::Utils;
use Type::Check qw(check); # not sure what this module will really be called
my $RoundedInt = declare as Int;
coerce $RoundedInt, from Int, via q{ int($_) };
sub foo {
state $sig = check[ Str, $RoundedInt, slurpy ArrayRef[$RoundedInt] ];
use v5.10;
use strict;
use warnings;
BEGIN {
package MySerialization1;
use Role::Tiny;
sub list_char { "," }
sub keyvalue_char { ":" }
around create_child_type => sub {
use v5.14;
package XYZ {
use Moo;
has attr1 => (
is => "ro",
isa => sub { $_[0] = __FILE__ if $_[0] eq '1' },
);
}