Port to Moo
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler.pm
index 66a9ca7..35bef91 100644 (file)
@@ -5,9 +5,10 @@ package DBIx::Class::DeploymentHandler;
 use Moose;
 
 extends 'DBIx::Class::DeploymentHandler::Dad';
+use DBIx::Class::DeploymentHandler::WithApplicatorDumple2;
 # a single with would be better, but we can't do that
 # see: http://rt.cpan.org/Public/Bug/Display.html?id=46347
-with 'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => {
+with WithApplicatorDumple2(
     interface_role       => 'DBIx::Class::DeploymentHandler::HandlesDeploy',
     class_name           => 'DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator',
     delegate_name        => 'deploy_method',
@@ -15,19 +16,19 @@ with 'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => {
     attributes_to_copy   => [qw(
       ignore_ddl databases script_directory sql_translator_args force_overwrite
     )],
-  },
-  'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => {
+  ),
+  WithApplicatorDumple2(
     interface_role       => 'DBIx::Class::DeploymentHandler::HandlesVersioning',
     class_name           => 'DBIx::Class::DeploymentHandler::VersionHandler::Monotonic',
     delegate_name        => 'version_handler',
     attributes_to_assume => [qw( database_version schema_version to_version )],
-  },
-  'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => {
+  ),
+  WithApplicatorDumple2(
     interface_role       => 'DBIx::Class::DeploymentHandler::HandlesVersionStorage',
     class_name           => 'DBIx::Class::DeploymentHandler::VersionStorage::Standard',
     delegate_name        => 'version_storage',
     attributes_to_assume => ['schema'],
-  };
+  );
 with 'DBIx::Class::DeploymentHandler::WithReasonableDefaults';
 
 sub prepare_version_storage_install {
@@ -106,7 +107,7 @@ much more flexible than L<DBIx::Class::Schema::Versioned>, hence the use of
 L<Moose> and lots of roles.
 
 C<DBIx::Class::DeploymentHandler> itself is just a recommended set of roles
-that we think will not only work well for everyone, but will also yeild the
+that we think will not only work well for everyone, but will also yield the
 best overall mileage.  Each role it uses has its own nuances and
 documentation, so I won't describe all of them here, but here are a few of the
 major benefits over how L<DBIx::Class::Schema::Versioned> worked (and
@@ -180,7 +181,7 @@ You started your project and weren't using C<DBIx::Class::DeploymentHandler>?
 Lucky for you I had you in mind when I wrote this doc.
 
 First,
-L<define the version|DBIx::Class::DeploymentHandler::Intro/Sample_database>
+L<define the version|DBIx::Class::DeploymentHandler::Manual::Intro/Sample_database>
 in your main schema file (maybe using C<$VERSION>).
 
 Then you'll want to just install the version_storage:
@@ -193,7 +194,7 @@ Then you'll want to just install the version_storage:
 
 Then set your database version:
 
- $dh->add_database_version({ version => $s->version });
+ $dh->add_database_version({ version => $s->schema_version });
 
 Now you should be able to use C<DBIx::Class::DeploymentHandler> like normal!