Skip to content

Instantly share code, notes, and snippets.

@masto
Created August 4, 2011 18:49
Show Gist options
  • Save masto/1125923 to your computer and use it in GitHub Desktop.
Save masto/1125923 to your computer and use it in GitHub Desktop.
use warnings;
use strict;
package Catalyst::Plugin::ConfigLoaderLocalHack;
our $VERSION = '1.00';
use Moose::Role;
use namespace::autoclean;
around 'find_files' => sub {
my $orig = shift;
my ($c) = @_;
my @files = $orig->(@_);
my $appname = ref $c || $c;
my $path = Catalyst::Utils::env_value($appname, 'LOCAL_CONFIG');
push @files, $path if defined $path;
return @files;
};
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment