Skip to content

Instantly share code, notes, and snippets.

View ilmari's full-sized avatar

Dagfinn Ilmari Mannsåker ilmari

View GitHub Profile
=head1 PSGI Middleware and the Future of Catalyst
The PSGI specification describes middleware as:
=over 4
"A middleware component takes another PSGI application and runs it. From the perspective of a server, a middleware component is a PSGI application. From the perspective of the application being run by the middleware component, the middleware is the server. Generally, this will be done in order to implement some sort of pre-processing on the PSGI environment hash or post-processing on the response."
=back
@ilmari
ilmari / loaded.pm
Last active December 31, 2015 01:59 — forked from arodland/loaded.pm
package if::loaded;
use Module::Runtime qw(module_notional_filename use_module);
sub work {
my $method = shift() ? 'import' : 'unimport';
my %args = map { $_ => [] } qw(try else args);
my $arg = 'try';
for (@_) {
if (/\A-(.*)\z/) {
## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirror.rackspace.com/ubuntu/ oneiric-updates main restricted
deb-src http://mirror.rackspace.com/ubuntu/ oneiric-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirror.rackspace.com/ubuntu/ oneiric universe
deb-src http://mirror.rackspace.com/ubuntu/ oneiric universe