Skip to content

Instantly share code, notes, and snippets.

View markstos's full-sized avatar

Mark Stosberg markstos

View GitHub Profile
@markstos
markstos / gist:4088910
Created November 16, 2012 16:51
Design attempt for a Moose role to provide access to a singleton config object
package Project::Role::Config;
use Moose::Role;
use Project::ConfigSingleton;
use Project::ToolSet;
Project::ConfigSingleton->initialize;
# The config hash provided by this role is managed by a singleton class
has 'config_singleton' => (
lazy => 1,
isa => 'Project::ConfigSingleton',
@markstos
markstos / gist:3431863
Created August 23, 2012 03:23 — forked from schwern/gist:896004
Benchmarking simple accessors, Moose vs Moos vs Mouse vs Moo vs hand written vs a hash
#!/usr/bin/env perl
use strict;
use warnings;
use Carp;
BEGIN {
# uncomment to test pure Perl Mouse
# $ENV{MOUSE_PUREPERL} = 1;