Skip to content

Instantly share code, notes, and snippets.

metacpan@debian:~/metacpan.org$ sudo /home/metacpan/bin/install_modules --installdeps .
install into /usr/local/perlbrew/perls/perl-5.16.2/bin/perl (v5.16.2) ?
--
on
.
Configuring
/home/metacpan/metacpan.org
...
N/A
@ranguard
ranguard / gist:11370900
Last active August 29, 2015 14:00
How to clean a structure?
my $unclean_data = {
field_1 => 'value',
field_2 => 'value',
do_NOT_leak => 'private info',
wibble => [
{
other_private_info => 'private info',
field_3 => 'value',
field_4 => 'value',
Due to lack of people using Apache 1.3.x this module has
not had recent patches (applied to L<Plack::Handler::Apache2>) added to it,
as no one working on the Plack project has the right test environment.
If you have issues with this code please consider looking at the
patches for L<Plack::Handler::Apache2> and if they work under
Apache 1.3.x submitting them back to the Plack project.
@ranguard
ranguard / gist:2953985
Created June 19, 2012 12:51
issue with split documentation
Anša Vernerová
Hello,
I would like to report that the current documentation for the split command is erronerrous.
http://perldoc.perl.org/functions/split.html says:
--
In time-critical applications, it is worthwhile to avoid splitting into more fields than necessary. Thus, when assigning to a list, if LIMIT is omitted (or zero), then LIMIT is treated as though it were one larger than the number of variables in the list; for the following, LIMIT is implicitly 4:
package CatalystX::Controller::Role::TemplateFromPath;
use MooseX::MethodAttributes::Role;
use namespace::autoclean;
=head1 NAME
CatalystX::Controller::Role::TemplateFromPath
=head1 SYNOPSIS
@ranguard
ranguard / gist:2345549
Created April 9, 2012 18:59
How to use the same list in puppet for multiple locations
$perl_modules = [ 'Data::Pageset', 'perl-module-b' ]
perlbrew::install_modules {
$perl_modules:
perl => 'a-version-of-perl'
}
perlbrew::install_modules {
$perl_modules:
@ranguard
ranguard / gist:2060044
Created March 17, 2012 14:34
Perl6 large archive files and presentations
http://blob.perl.org/perlweb/dev/perl6/talks/2001/Perl6-Notes-200108.v2.pdf
http://blob.perl.org/perlweb/dev/perl6/talks/2001/dconway-Perl6.pdf
http://blob.perl.org/perlweb/dev/perl6/talks/2001/onion5.pdf
http://blob.perl.org/perlweb/dev/perl6/talks/2001/lwce-010131/lwce-010131.tgz
http://blob.perl.org/perlweb/dev/perl6/talks/2001/lwce-010131/perl6-update.ppt
http://blob.perl.org/perlweb/dev/perl6/talks/2001/lwce-010131/Perl6-Update_files/outline.htm
http://blob.perl.org/perlweb/dev/perl6/talks/2001/lwce-010131/Perl6-Update_files/preview.wmf
http://blob.perl.org/perlweb/dev/perl6/talks/2001/lwce-010131/Perl6-Update_files/slide0001_image001.png
http://blob.perl.org/perlweb/dev/perl6/talks/2001/lwce-010131/Perl6-Update_files/slide0001_image002.gif
@ranguard
ranguard / gist:2043619
Created March 15, 2012 10:55
Insane writer?
#!/usr/bin/env perl
use strict;
use Plack::Builder;
use Plack::Middleware::ErrorDocument;
my $root = '/home/leo/git/fab/vhosts/ah/docs/www';
my $app = sub {
@ranguard
ranguard / gist:1541227
Created December 30, 2011 19:56
Error installing Starman
FreeBSD 8.2-RELEASE FreeBSD 8.2-RELEASE #1
prove -lvr t/suite.t
t/suite.t .. 2011/12/30-19:48:04 Starman::Server (type Net::Server::PreFork) starting! pid(77243)
Binding to TCP port 50026 on host 127.0.0.1
Setting gid to "1003 1003 1003"
....
not ok 46
# Failed test at /home/lpm/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Plack/Test/Suite.pm line 248.
@ranguard
ranguard / gist:1471606
Created December 13, 2011 10:36
MooseX::ClassAttribute bug/feature?
package My::Base;
use Moose;
use MooseX::ClassAttribute;
class_has 'foo' =>
( is => 'rw',
isa => 'Str',
lazy_build => 1,
);