Skip to content

Instantly share code, notes, and snippets.

@dagolden
dagolden / Foo.pm
Created August 3, 2011 02:06
Failing case for Pod::Elemental
package Foo;
use strict;
use warnings;
=pod
=head1 NAME
Foo - I am Foo
@dagolden
dagolden / elemental.pl
Created August 3, 2011 02:08
test program for Pod::Elemetnal
#!/usr/bin/env perl
use strict;
use warnings;
use Pod::Elemental;
use Pod::Elemental::Transformer::Pod5;
my $file = shift or die "No file argument";
my $document = Pod::Elemental->read_file($file);
use strict;
package PAUSE;
our $Config;
$Config->{AUTHEN_DATA_SOURCE_NAME} = "DBI:SQLite:dbname=$ENV{HOME}/var/db/authen_pause.sqlite";
$Config->{AUTHEN_DATA_SOURCE_USER} = "pause";
$Config->{AUTHEN_DATA_SOURCE_PW} = "pause";
$Config->{MOD_DATA_SOURCE_NAME} = "DBI:SQLite:dbname=$ENV{HOME}/var/db/mod.sqlite";
$Config->{MOD_DATA_SOURCE_USER} = "pause";
$Config->{MOD_DATA_SOURCE_PW} = "pause";
$Config->{MLROOT} = "$ENV{HOME}/var/PAUSE/authors/id/";
@dagolden
dagolden / gist:1188403
Created September 2, 2011 11:21
perl loop sample
# for loop
for my $i ( 0 .. 12 ) {
print "$i\n";
}
# for statement modifier
print "$_\n" for 0 .. 12;
use 5.006;
use strict;
use warnings;
package Task::BeLike::DAGOLDEN;
our $VERSION = '0.001'; # VERSION
1;
# ABSTRACT: DAGOLDEN's frequently-used or favorite modules
From 73512201d7f34e916ab9c04a5f41248b4740e29a Mon Sep 17 00:00:00 2001
From: David Golden <[email protected]>
Date: Fri, 9 Dec 2011 14:32:08 -0500
Subject: [PATCH] Fix segfault on overloaded arithmetic assignment
Consider an arithmetic assignment operation of the form
$left += $right
A segfault was occuring in the case where $right is an overloaded object
@dagolden
dagolden / gist:1713300
Created January 31, 2012 22:02
thoughts about surveying breakage tolerances
Breakage survey
---------------
Concept: survey p5p and broader Perl community to determine some
community standards for how much p5p can break things and what would be a
representative sample for testing that.
Rationale
---------
@dagolden
dagolden / gist:1724159
Created February 2, 2012 15:56
hello-world carton recipe for chef
include_recipe 'perlbrew'
include_recipe 'carton'
package 'git'
git node['hello-world']['deploy_dir'] do
repository node['hello-world']['deploy_repo']
reference node['hello-world']['deploy_tag']
end
@dagolden
dagolden / gist:1741873
Created February 5, 2012 01:44
my dist.ini template
{{
$license = ref $dist->license;
if ( $license =~ /^Software::License::(.+)$/ ) {
$license = $1;
} else {
$license = "$license";
}
$authors = join( "\n", map { "author = $_" } @{$dist->authors} );
$copyright_year = (localtime)[5] + 1900;
@dagolden
dagolden / gist:1792819
Created February 10, 2012 20:56
excerpt
[... earlier log output omitted ...]
[Fri, 10 Feb 2012 15:55:09 -0500] INFO: Processing git[/opt/hello-world] action sync (hello-world::default line 24)
[Fri, 10 Feb 2012 15:55:10 -0500] INFO: git[/opt/hello-world] updated to revision 5deb2b11d8d472471b2c5ca17f61ee58248e95f7
[Fri, 10 Feb 2012 15:55:10 -0500] INFO: Processing carton_app[hello-world] action enable (hello-world::default line 30)
[Fri, 10 Feb 2012 15:55:10 -0500] INFO: Processing runit_service[hello-world] action enable (/var/chef-solo/cookbooks/carton/providers/app.rb line 70)
[Fri, 10 Feb 2012 15:55:10 -0500] INFO: Processing carton_app[hello-world] action start (hello-world::default line 38)
[Fri, 10 Feb 2012 15:55:10 -0500] INFO: Processing runit_service[hello-world] action start (/var/chef-solo/cookbooks/carton/providers/app.rb line 95)
[Fri, 10 Feb 2012 15:55:10 -0500] INFO: git[/opt/hello-world] sending restart action to carton_app[hello-world] (delayed)
[Fri, 10 Feb 2012 15:55:10 -0500] INFO: Processing carton_app[hello-world] action rest