Closed yanick closed 9 years ago
Another stylistic nitpick:
if ( $self->has_target ) {
$self->_dh->install({ version => $self->target });
}
else {
$self->_dh->install;
}
return;
I'd probably prefer that structure represented as:
if ( $self->has_target ) {
$self->_dh->install({ version => $self->target });
return;
}
$self->_dh->install;
return;
Or perhaps:
my $opts = {};
$opts->{version} = $self->target if $self->has_target;
$self->_dh->install($opts);
return;
Assuming of course that the empty hash has the same effect as no arguments, which seems to be true for ->install()
: https://metacpan.org/source/FREW/DBIx-Class-DeploymentHandler-0.002215/lib/DBIx/Class/DeploymentHandler/Dad.pm#L38
However, seems ->upgrade()
doesn't take any arguments at present: https://metacpan.org/source/FREW/DBIx-Class-DeploymentHandler-0.002215/lib/DBIx/Class/DeploymentHandler/Dad.pm#L56
I've simplified the --target stuff, and added tests!