Created
August 4, 2011 18:49
-
-
Save masto/1125923 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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