Browse files

Adjustment to the method to figure out the camp database type

This patch adjusts the logic so that when the config hash doesn't
already exist then it uses the camp database type.  Without this
it causes an issue with mkcamp when it doesn't have a number
argument.
  • Loading branch information...
1 parent 964c608 commit 493324edeb95435bd4447fffa8ac7f9d61724109 @rmtemplet committed Oct 5, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/Camp/Master.pm
View
8 lib/Camp/Master.pm
@@ -732,7 +732,13 @@ sub _camp_db_type_dispatcher {
sub _db_type_dispatcher {
my $name = shift;
- my $type = camp_type_db_type();
+ my $type;
+ if ($conf_hash) {
+ $type = $conf_hash->{db_type};
+ }
+ else {
+ $type = camp_db_type();
+ }
my $sub = __PACKAGE__->can( "${name}_$type" );
die "No function $name for database type $type!\n" unless $sub;
return $sub;

0 comments on commit 493324e

Please sign in to comment.