Skip to content

Instantly share code, notes, and snippets.

@dagolden
dagolden / cpan-local-lib-demo.txt
Created Jan 5, 2011
Demo of CPAN.pm with local::lib bootstrap
View cpan-local-lib-demo.txt
cleanroom@vulcan:~$ /opt/perl/v5.13.7-clean/bin/cpan
CPAN is the world-wide archive of perl resources. It consists of about
300 sites that all replicate the same contents around the globe. Many
countries have at least one CPAN site already. The resources found on
CPAN are easily accessible with the CPAN.pm module. If you want to use
CPAN.pm, lots of things have to be configured. Fortunately, most of
them can be determined automatically. If you prefer the automatic
configuration, answer 'yes' below.
View dzil-profile.txt
--> Working on Dist::Zilla
Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Dist-Zilla-5.012.tar.gz ... OK
==> Found dependencies: File::ShareDir::Install
--> Working on File::ShareDir::Install
Fetching http://www.cpan.org/authors/id/G/GW/GWYN/File-ShareDir-Install-0.07.tar.gz ... OK
Configuring File-ShareDir-Install-0.07 ... OK
Building and testing File-ShareDir-Install-0.07 ... OK
Successfully installed File-ShareDir-Install-0.07 (3 secs)
Configuring Dist-Zilla-5.012 ... OK
==> Found dependencies: Config::MVP::Assembler::WithBundles, Moose::Autobox, MooseX::Types, Perl::PrereqScanner, Config::MVP::Reader::INI, String::Formatter, PPI::Document, String::RewritePrefix, Test::File::ShareDir, MooseX::Types::Perl, Software::License::None, Mixin::Linewise::Readers, CPAN::Uploader, Config::MVP::Reader, Moose, DateTime, File::Find::Rule, JSON, Perl::Version, Text::Glob, Test::Fatal, autobox, List::AllUtils, MooseX::Role::Parameterized, Config::MVP::Reader::Finder, MooseX::LazyRequire, Hash::Merge::Simple, Term::UI,
View dzil-report.txt
Total time recorded: 798
Moose-2.1202: 123
Module-Build-0.4204: 63
Dist-Zilla-5.012: 51
IO-Socket-SSL-1.966: 39
PPI-1.215: 26
DateTime-TimeZone-1.63: 24
File-Temp-0.2304: 21
DateTime-1.06: 21
@dagolden
dagolden / version-pm-evolution.txt
Last active Jan 4, 2016
version number evolution discussions from Lyon 2014
View version-pm-evolution.txt
Broad decisions about rationalizing version object behavior based on
discussions at the Lyon QAH. Participants: David Golden, Ricardo Signes,
Karen Etheridge, Leon Timmermans, Peter Rabbitson and Graham Knop
- version comparision should be done irrespective of the presence of
underscores in the string used to initialize the version object
- underscore should no longer be used as a tuple separator in vstrings or
vstring-like strings; vstrings are converted to tuples by splitting into
*characters* (not bytes) and converting to codepoints; any elements after
View newperl-nolib
#!/usr/bin/env perl
use v5.10;
use strict;
use warnings;
use autodie qw/:all/;
my $as = shift
or die "Usage: $0 <perl-version> [install args]";
my @args = @ARGV;
@dagolden
dagolden / gist:8337300
Created Jan 9, 2014
improved tmux hack command
View gist:8337300
hack () {
local dir=$(find ~/git '(' '(' -name .git -or -name .build ')' -prune -false ')' -or -iname $1 -type d)
if [[ -n $dir && -d $dir ]]; then
tmux new-window -c $dir -n $(basename $dir)
elif [[ -n $dir ]]; then
local count=$(echo $dir | wc -w)
echo $1 ambiguous: $count matches
else
echo "$1 not found"
fi
View travis-enable
#!/usr/bin/env perl
use v5.10;
use strict;
use warnings;
use Carp;
use Net::GitHub;
use Getopt::Lucid ':all';
use Path::Tiny;
my $opts = Getopt::Lucid->getopt(
View safe-isa.pod

Playing it safe with Safe::Isa

Earlier this year in Manhattan, a garage worker drove an Audi into an open car elevator shaft. The car fell three floors and the worker escaped through the sun roof.

Every year I see stories of people falling in elevator shafts — sometimes dying — when the elevator they are expecting to be there suddenly isn't.

View gist:7661429
FEATURE C::T O::T C::A
--------------------------------------------------------------
attributes defined via import yes yes no
read/write accessors yes no yes
lazy attribute defaults yes no no
provides new yes yes yes
provides DESTROY yes no no
new takes either hashref or list yes no (list) no (hash)
new validates arguments yes no no
View locking.t
use 5.008001;
use strict;
use warnings;
use Test::More 0.96;
use File::Spec;
use Cwd;
use lib 't/lib';
use TestUtils qw/exception/;