Skip to content
Browse files

prepend Oyster::Provision:: if not supplied by config

  • Loading branch information...
1 parent 9e1b1d2 commit 6762f691c9affbd64839a418bc52b03a8f23290f hakim committed Nov 20, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Dist/Zilla/App/Command/provision.pm
View
5 lib/Dist/Zilla/App/Command/provision.pm
@@ -9,6 +9,7 @@ use Dist::Zilla::App -command;
use Moose;
use Config::Any;
use Hash::Merge 'merge';
+use Oyster::Provision;
sub abstract { 'provision a new Oyster VM' }
@@ -35,12 +36,12 @@ sub execute {
my %hash = @hashes > 1 ? %{ merge( @hashes ) } : $hashes[0];
- $hash{provision_backend} = delete $hash{type} || 'Oyster::Provision::Rackspace';
+ my $type = delete $hash{type} || 'Oyster::Provision::Rackspace';
+ $hash{provision_backend} = $type =~/^Oyster::Provision::/ ? $type : "Oyster::Provision::$type";
$hash{pub_ssh} ||= "$ENV{HOME}/.ssh/id_rsa.pub";
$hash{size} ||= 1; # id 1 - ram 256 MiB - disk 10 GiB
$hash{image} ||= 69; # id 69 - Ubuntu 10.10 (meerkat)
- use Oyster::Provision;
my $server = Oyster::Provision->new(
name => $name,
config => \%hash,

0 comments on commit 6762f69

Please sign in to comment.
Something went wrong with that request. Please try again.