From: Marco Fontani Date: Sat, 4 Dec 2010 13:53:39 +0000 (+0000) Subject: Configurable config file X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=13f0b86a4436e0b92f2ed692ae01f8795953ed93;p=p5sagit%2FOyster.git Configurable config file --- diff --git a/lib/Dist/Zilla/App/Command/provision.pm b/lib/Dist/Zilla/App/Command/provision.pm index 9bc0ff9..68fe099 100644 --- a/lib/Dist/Zilla/App/Command/provision.pm +++ b/lib/Dist/Zilla/App/Command/provision.pm @@ -16,6 +16,7 @@ sub abstract { 'provision a new Oyster VM' } sub opt_spec { [ 'name=s' => 'the name of the VM to create' ], + [ 'config=s' => 'the name of the config file to use, default ./oyster.conf' ], } sub execute { @@ -25,7 +26,7 @@ sub execute { my $name = $opt->name or die "No name provided!"; - my @config_files = ( './oyster.conf' ); # TODO make configurable + my @config_files = ($opt->name or './oyster.conf'); my $cfg = Config::Any->load_files({ files => \@config_files, use_ext => 0 }); ($cfg) = values %{ $cfg->[0] }; # FIX with ::JFDI or similar