From: Arthur Axel 'fREW' Schmidt Date: Wed, 4 Apr 2012 23:50:49 +0000 (-0500) Subject: Port to Moo X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class-DeploymentHandler.git;a=commitdiff_plain;h=a976d6e46695d7015239ee4c30cb3708f4ce7942 Port to Moo --- diff --git a/dist.ini b/dist.ini index 03043ca..7905e5d 100644 --- a/dist.ini +++ b/dist.ini @@ -29,6 +29,10 @@ Log::Contextual = 0.004200 File::Path = 2.08 DBIx::Class = 0.08121 Moose = 1.0 +Moo = 1.0 +MooX::Types::MooseLike = 0.04 +Package::Variant = 0 +Module::Runtime = 0 MooseX::Role::Parameterized = 0.18 Try::Tiny = 0 SQL::Translator = 0.11005 diff --git a/lib/DBIx/Class/DeploymentHandler.pm b/lib/DBIx/Class/DeploymentHandler.pm index 41a8210..35bef91 100644 --- a/lib/DBIx/Class/DeploymentHandler.pm +++ b/lib/DBIx/Class/DeploymentHandler.pm @@ -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 { diff --git a/lib/DBIx/Class/DeploymentHandler/Dad.pm b/lib/DBIx/Class/DeploymentHandler/Dad.pm index 4b3c7fc..f3a8ec4 100644 --- a/lib/DBIx/Class/DeploymentHandler/Dad.pm +++ b/lib/DBIx/Class/DeploymentHandler/Dad.pm @@ -2,11 +2,11 @@ package DBIx::Class::DeploymentHandler::Dad; # ABSTRACT: Parent class for DeploymentHandlers -use Moose; -require DBIx::Class::Schema; # loaded for type constraint +use Moo; use Carp::Clan '^DBIx::Class::DeploymentHandler'; use DBIx::Class::DeploymentHandler::LogImporter ':log'; -use DBIx::Class::DeploymentHandler::Types; +use DBIx::Class::DeploymentHandler::Types 'StrSchemaVersion'; +use MooX::Types::MooseLike::Base qw(Str); has schema => ( is => 'ro', @@ -14,23 +14,23 @@ has schema => ( ); has backup_directory => ( - isa => 'Str', + isa => Str, is => 'ro', predicate => 'has_backup_directory', ); has to_version => ( is => 'ro', - isa => 'Str', - lazy_build => 1, + isa => Str, + builder => '_build_to_version', ); sub _build_to_version { $_[0]->schema_version } has schema_version => ( is => 'ro', - isa => 'StrSchemaVersion', - lazy_build => 1, + isa => StrSchemaVersion, + builder => '_build_schema_version', ); sub _build_schema_version { $_[0]->schema->schema_version } @@ -97,8 +97,6 @@ sub backup { $self->schema->storage->backup($self->backup_directory) } -__PACKAGE__->meta->make_immutable; - 1; # vim: ts=2 sw=2 expandtab diff --git a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm index 0e89098..59b47b6 100644 --- a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm +++ b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm @@ -1,8 +1,11 @@ package DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator; -use Moose; +use Moo; # ABSTRACT: Manage your SQL and Perl migrations in nicely laid out directories +use Sub::Quote 'quote_sub'; +use MooX::Types::MooseLike::Base qw(ArrayRef Bool HashRef Str); + use autodie; use Carp qw( carp croak ); use DBIx::Class::DeploymentHandler::LogImporter qw(:log :dlog); @@ -13,8 +16,7 @@ use Try::Tiny; use SQL::Translator; require SQL::Translator::Diff; -require DBIx::Class::Storage; # loaded for type constraint -use DBIx::Class::DeploymentHandler::Types; +use DBIx::Class::DeploymentHandler::Types 'Storage'; use File::Path 'mkpath'; use File::Spec::Functions; @@ -22,15 +24,13 @@ use File::Spec::Functions; with 'DBIx::Class::DeploymentHandler::HandlesDeploy'; has ignore_ddl => ( - isa => 'Bool', + isa => Bool, is => 'ro', - default => undef, ); has force_overwrite => ( - isa => 'Bool', + isa => Bool, is => 'ro', - default => undef, ); has schema => ( @@ -39,9 +39,9 @@ has schema => ( ); has storage => ( - isa => 'DBIx::Class::Storage', + isa => Storage, is => 'ro', - lazy_build => 1, + builder => '_build_storage', ); sub _build_storage { @@ -52,34 +52,40 @@ sub _build_storage { } has sql_translator_args => ( - isa => 'HashRef', + isa => HashRef, is => 'ro', - default => sub { {} }, + default => quote_sub(q( {} )), ); + has script_directory => ( - isa => 'Str', + isa => Str, is => 'ro', - required => 1, - default => 'sql', + default => quote_sub(q{ 'sql' }), ); has databases => ( - coerce => 1, - isa => 'DBIx::Class::DeploymentHandler::Databases', is => 'ro', - default => sub { [qw( MySQL SQLite PostgreSQL )] }, + #isa => ArrayRef[Str], + #coerce => quote_sub(q{ + #if (ref(\$_[0]) eq 'SCALAR') { + #return [$_[0]] + #} else { + #return $_[0] + #} + #}), + default => quote_sub(q{ [qw( MySQL SQLite PostgreSQL )] }), ); has txn_wrap => ( is => 'ro', - isa => 'Bool', - default => 1, + isa => Bool, + default => quote_sub(q{ 1 }), ); has schema_version => ( is => 'ro', - isa => 'Str', - lazy_build => 1, + isa => Str, + builder => '_build_schema_version', ); # this will probably never get called as the DBICDH @@ -510,7 +516,7 @@ sub _prepare_install { my $from_file = shift; my $to_file = shift; my $dir = $self->script_directory; - my $databases = $self->databases; + my $databases = ref $self->databases ? $self->databases : [$self->databases]; my $version = $self->schema_version; foreach my $db (@$databases) { @@ -624,7 +630,7 @@ sub _coderefs_per_files { sub _prepare_changegrade { my ($self, $from_version, $to_version, $version_set, $direction) = @_; my $schema = $self->schema; - my $databases = $self->databases; + my $databases = ref $self->databases ? $self->databases : [$self->databases]; my $dir = $self->script_directory; my $schema_version = $self->schema_version; diff --git a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator/Deprecated.pm b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator/Deprecated.pm index 14973cb..0d2febf 100644 --- a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator/Deprecated.pm +++ b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator/Deprecated.pm @@ -1,5 +1,5 @@ package DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated; -use Moose; +use Moo; # ABSTRACT: (DEPRECATED) Use this if you are stuck in the past @@ -41,8 +41,6 @@ sub _ddl_schema_up_consume_filenames { return [$self->_ddl_schema_up_produce_filename($type, $versions)] } -__PACKAGE__->meta->make_immutable; - 1; # vim: ts=2 sw=2 expandtab diff --git a/lib/DBIx/Class/DeploymentHandler/Deprecated.pm b/lib/DBIx/Class/DeploymentHandler/Deprecated.pm index d460fb4..56c99a4 100644 --- a/lib/DBIx/Class/DeploymentHandler/Deprecated.pm +++ b/lib/DBIx/Class/DeploymentHandler/Deprecated.pm @@ -6,21 +6,22 @@ use Moose; use Moose::Util 'apply_all_roles'; 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::Deprecated', delegate_name => 'deploy_method', attributes_to_assume => ['schema'], attributes_to_copy => [qw( script_directory databases sql_translator_args )], - }, - 'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => { + ), + WithApplicatorDumple2( interface_role => 'DBIx::Class::DeploymentHandler::HandlesVersionStorage', class_name => 'DBIx::Class::DeploymentHandler::VersionStorage::Deprecated', delegate_name => 'version_storage', attributes_to_assume => ['schema'], - }; + ); with 'DBIx::Class::DeploymentHandler::WithReasonableDefaults'; sub BUILD { @@ -29,22 +30,22 @@ sub BUILD { if ($self->schema->can('ordered_versions') && $self->schema->ordered_versions) { apply_all_roles( $self, - 'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => { + WithApplicatorDumple2( interface_role => 'DBIx::Class::DeploymentHandler::HandlesVersioning', class_name => 'DBIx::Class::DeploymentHandler::VersionHandler::ExplicitVersions', delegate_name => 'version_handler', attributes_to_assume => [qw( database_version schema_version to_version )], - } + ) ); } else { apply_all_roles( $self, - 'DBIx::Class::DeploymentHandler::WithApplicatorDumple' => { + WithApplicatorDumple2( interface_role => 'DBIx::Class::DeploymentHandler::HandlesVersioning', class_name => 'DBIx::Class::DeploymentHandler::VersionHandler::DatabaseToSchemaVersions', delegate_name => 'version_handler', attributes_to_assume => [qw( database_version schema_version to_version )], - } + ) ); } # the following is just a hack so that ->version_storage diff --git a/lib/DBIx/Class/DeploymentHandler/HandlesDeploy.pm b/lib/DBIx/Class/DeploymentHandler/HandlesDeploy.pm index c931d42..b020eac 100644 --- a/lib/DBIx/Class/DeploymentHandler/HandlesDeploy.pm +++ b/lib/DBIx/Class/DeploymentHandler/HandlesDeploy.pm @@ -1,5 +1,5 @@ package DBIx::Class::DeploymentHandler::HandlesDeploy; -use Moose::Role; +use Moo::Role; # ABSTRACT: Interface for deploy methods diff --git a/lib/DBIx/Class/DeploymentHandler/HandlesVersionStorage.pm b/lib/DBIx/Class/DeploymentHandler/HandlesVersionStorage.pm index 9f8cfac..847042a 100644 --- a/lib/DBIx/Class/DeploymentHandler/HandlesVersionStorage.pm +++ b/lib/DBIx/Class/DeploymentHandler/HandlesVersionStorage.pm @@ -1,5 +1,5 @@ package DBIx::Class::DeploymentHandler::HandlesVersionStorage; -use Moose::Role; +use Moo::Role; # ABSTRACT: Interface for version storage methods diff --git a/lib/DBIx/Class/DeploymentHandler/HandlesVersioning.pm b/lib/DBIx/Class/DeploymentHandler/HandlesVersioning.pm index 92ac5f7..5ca2974 100644 --- a/lib/DBIx/Class/DeploymentHandler/HandlesVersioning.pm +++ b/lib/DBIx/Class/DeploymentHandler/HandlesVersioning.pm @@ -1,5 +1,5 @@ package DBIx::Class::DeploymentHandler::HandlesVersioning; -use Moose::Role; +use Moo::Role; # ABSTRACT: Interface for version methods diff --git a/lib/DBIx/Class/DeploymentHandler/Types.pm b/lib/DBIx/Class/DeploymentHandler/Types.pm index 2cefab6..eed11bd 100644 --- a/lib/DBIx/Class/DeploymentHandler/Types.pm +++ b/lib/DBIx/Class/DeploymentHandler/Types.pm @@ -4,23 +4,37 @@ use warnings; # ABSTRACT: Types internal to DBIx::Class::DeploymentHandler -use Moose::Util::TypeConstraints; -subtype 'DBIx::Class::DeploymentHandler::Databases' - => as 'ArrayRef[Str]'; - -coerce 'DBIx::Class::DeploymentHandler::Databases' - => from 'Str' - => via { [$_] }; - -subtype 'StrSchemaVersion' - => as 'Str' - => message { - defined $_ - ? "Schema version (currently '$_') must be a string" - : 'Schema version must be defined' - }; - -no Moose::Util::TypeConstraints; +use Sub::Quote 'quote_sub'; + +use Sub::Exporter -setup => { + exports => [ qw(Storage ResultSet StrSchemaVersion) ], +}; + +sub ResultSet { +quote_sub(q{ + use Check::ISA; + obj($_[0], 'DBIx::Class::ResultSet') + or die 'version_rs should be a DBIx::Class::ResultSet!' + }) +} + +sub Storage { +quote_sub(q{ + use Check::ISA; + obj($_[0], 'DBIx::Class::Storage') + or die 'storage should be a DBIx::Class::Storage!' + }) +} + +sub StrSchemaVersion { + quote_sub(q{ + die(defined $_[0] + ? "Schema version (currently '$_[0]') must be a string" + : 'Schema version must be defined' + ) unless ref(\$_[0]) eq 'SCALAR' + }) +} + 1; # vim: ts=2 sw=2 expandtab diff --git a/lib/DBIx/Class/DeploymentHandler/VersionHandler/DatabaseToSchemaVersions.pm b/lib/DBIx/Class/DeploymentHandler/VersionHandler/DatabaseToSchemaVersions.pm index 0a199a4..adaaf16 100644 --- a/lib/DBIx/Class/DeploymentHandler/VersionHandler/DatabaseToSchemaVersions.pm +++ b/lib/DBIx/Class/DeploymentHandler/VersionHandler/DatabaseToSchemaVersions.pm @@ -1,34 +1,36 @@ package DBIx::Class::DeploymentHandler::VersionHandler::DatabaseToSchemaVersions; -use Moose; +use Moo; +use Sub::Quote 'quote_sub'; +use MooX::Types::MooseLike::Base qw(Str Bool); # ABSTRACT: Go straight from Database to Schema version with 'DBIx::Class::DeploymentHandler::HandlesVersioning'; has schema_version => ( - isa => 'Str', + isa => Str, is => 'ro', required => 1, ); has database_version => ( - isa => 'Str', + isa => Str, is => 'ro', required => 1, ); has to_version => ( # configuration - is => 'ro', - isa => 'Str', - lazy_build => 1, + is => 'ro', + isa => Str, + builder => '_build_to_version', ); sub _build_to_version { $_[0]->schema_version } has once => ( is => 'rw', - isa => 'Bool', - default => undef, + isa => Bool, + default => quote_sub(q{undef}), ); sub next_version_set { @@ -53,9 +55,6 @@ sub previous_version_set { return [$self->database_version, $self->to_version]; } - -__PACKAGE__->meta->make_immutable; - 1; # vim: ts=2 sw=2 expandtab diff --git a/lib/DBIx/Class/DeploymentHandler/VersionHandler/ExplicitVersions.pm b/lib/DBIx/Class/DeploymentHandler/VersionHandler/ExplicitVersions.pm index d3d5d6b..bac5435 100644 --- a/lib/DBIx/Class/DeploymentHandler/VersionHandler/ExplicitVersions.pm +++ b/lib/DBIx/Class/DeploymentHandler/VersionHandler/ExplicitVersions.pm @@ -1,5 +1,6 @@ package DBIx::Class::DeploymentHandler::VersionHandler::ExplicitVersions; -use Moose; +use Moo; +use MooX::Types::MooseLike::Base qw(Str ArrayRef Int HashRef); # ABSTRACT: Define your own list of versions to use for migrations @@ -8,35 +9,37 @@ use Carp 'croak'; with 'DBIx::Class::DeploymentHandler::HandlesVersioning'; has schema_version => ( - isa => 'Str', + isa => Str, is => 'ro', required => 1, ); has database_version => ( - isa => 'Str', + isa => Str, is => 'ro', required => 1, ); has to_version => ( is => 'ro', - isa => 'Str', - lazy_build => 1, + isa => Str, + builder => '_build_to_version', + lazy => 1, ); sub _build_to_version { $_[0]->schema_version } has ordered_versions => ( is => 'ro', - isa => 'ArrayRef', + isa => ArrayRef, required => 1, ); has _index_of_versions => ( is => 'ro', - isa => 'HashRef', - lazy_build => 1, + isa => HashRef, + builder => '_build__index_of_versions', + lazy => 1, ); sub _build__index_of_versions { @@ -50,8 +53,9 @@ sub _build__index_of_versions { has _version_idx => ( is => 'rw', - isa => 'Int', - lazy_build => 1, + isa => Int, + builder => '_build__version_idx', + lazy => 1, ); sub _build__version_idx { $_[0]->_index_of_versions->{$_[0]->database_version} } @@ -100,8 +104,6 @@ sub previous_version_set { } } -__PACKAGE__->meta->make_immutable; - 1; # vim: ts=2 sw=2 expandtab diff --git a/lib/DBIx/Class/DeploymentHandler/VersionHandler/Monotonic.pm b/lib/DBIx/Class/DeploymentHandler/VersionHandler/Monotonic.pm index 3a2fec4..e9fdff2 100644 --- a/lib/DBIx/Class/DeploymentHandler/VersionHandler/Monotonic.pm +++ b/lib/DBIx/Class/DeploymentHandler/VersionHandler/Monotonic.pm @@ -1,5 +1,6 @@ package DBIx::Class::DeploymentHandler::VersionHandler::Monotonic; -use Moose; +use Moo; +use MooX::Types::MooseLike::Base qw(Int); # ABSTRACT: Obvious version progressions @@ -8,29 +9,31 @@ use Carp 'croak'; with 'DBIx::Class::DeploymentHandler::HandlesVersioning'; has schema_version => ( - isa => 'Int', + isa => Int, is => 'ro', required => 1, ); has database_version => ( - isa => 'Int', + isa => Int, is => 'ro', required => 1, ); has to_version => ( - isa => 'Int', + isa => Int, is => 'ro', - lazy_build => 1, + lazy => 1, + builder => '_build_to_version', ); sub _build_to_version { $_[0]->schema_version } has _version => ( is => 'rw', - isa => 'Int', - lazy_build => 1, + isa => Int, + lazy => 1, + builder => '_build__version', ); sub _inc_version { $_[0]->_version($_[0]->_version + 1 ) } @@ -66,8 +69,6 @@ sub next_version_set { } } -__PACKAGE__->meta->make_immutable; - 1; # vim: ts=2 sw=2 expandtab diff --git a/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated.pm b/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated.pm index de6abd1..d5d2394 100644 --- a/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated.pm +++ b/lib/DBIx/Class/DeploymentHandler/VersionStorage/Deprecated.pm @@ -1,7 +1,8 @@ package DBIx::Class::DeploymentHandler::VersionStorage::Deprecated; -use Moose; +use Moo; +use Sub::Quote 'quote_sub'; use DBIx::Class::DeploymentHandler::LogImporter ':log'; - +use DBIx::Class::DeploymentHandler::Types 'ResultSet'; # ABSTRACT: (DEPRECATED) Use this if you are stuck in the past @@ -11,7 +12,7 @@ has schema => ( ); has version_rs => ( - isa => 'DBIx::Class::ResultSet', + isa => ResultSet, is => 'ro', builder => '_build_version_rs', handles => [qw( database_version version_storage_is_installed )], @@ -41,8 +42,6 @@ sub delete_database_version { $_[0]->version_rs->search({ version => $version})->delete } -__PACKAGE__->meta->make_immutable; - 1; # vim: ts=2 sw=2 expandtab diff --git a/lib/DBIx/Class/DeploymentHandler/VersionStorage/Standard.pm b/lib/DBIx/Class/DeploymentHandler/VersionStorage/Standard.pm index dc9a7cc..b1af275 100644 --- a/lib/DBIx/Class/DeploymentHandler/VersionStorage/Standard.pm +++ b/lib/DBIx/Class/DeploymentHandler/VersionStorage/Standard.pm @@ -1,6 +1,7 @@ package DBIx::Class::DeploymentHandler::VersionStorage::Standard; -use Moose; +use Moo; use DBIx::Class::DeploymentHandler::LogImporter ':log'; +use DBIx::Class::DeploymentHandler::Types 'ResultSet'; # ABSTRACT: Version storage that does the normal stuff @@ -12,7 +13,7 @@ has schema => ( ); has version_rs => ( - isa => 'DBIx::Class::ResultSet', + isa => ResultSet, is => 'ro', builder => '_build_version_rs', handles => [qw( database_version version_storage_is_installed )], @@ -40,8 +41,6 @@ sub delete_database_version { $_[0]->version_rs->search({ version => $version})->delete } -__PACKAGE__->meta->make_immutable; - 1; # vim: ts=2 sw=2 expandtab diff --git a/lib/DBIx/Class/DeploymentHandler/WithApplicatorDumple2.pm b/lib/DBIx/Class/DeploymentHandler/WithApplicatorDumple2.pm new file mode 100644 index 0000000..681a49b --- /dev/null +++ b/lib/DBIx/Class/DeploymentHandler/WithApplicatorDumple2.pm @@ -0,0 +1,57 @@ +package DBIx::Class::DeploymentHandler::WithApplicatorDumple2; + +use strict; +use warnings; + +use Package::Variant + importing => { + 'Module::Runtime' => ['require_module'], + 'Moose::Role' => [], + }, + subs => [qw(has require_module)]; + +sub make_variant { + my ($class, $target, %args) = @_; + + my $interface_role = $args{interface_role} + or die 'interface_role is required!'; + + my $class_name = $args{class_name} + or die 'class_name is required!'; + + my $delegate_name = $args{delegate_name} + or die 'delegate_name is required!'; + + my $attributes_to_copy = $args{attributes_to_copy} || []; + my $attributes_to_assume = $args{attributes_to_assume} || []; + + require_module($class_name); + + my $meta = Class::MOP::class_of($class_name); + + has($_->name => %{ $_->clone }) + for grep { $_ } map $meta->find_attribute_by_name($_), @{ $attributes_to_copy }; + + has($delegate_name => ( + is => 'ro', + lazy_build => 1, + does => $interface_role, + handles => $interface_role, + )); + + install '_build_'.$delegate_name => sub { + my $self = shift; + + $class_name->new({ + map { $_ => $self->$_ } + @{ $attributes_to_assume }, + @{ $attributes_to_copy }, + }) + }; +}; + +1; + +# vim: ts=2 sw=2 expandtab + +__END__ diff --git a/lib/DBIx/Class/DeploymentHandler/WithReasonableDefaults.pm b/lib/DBIx/Class/DeploymentHandler/WithReasonableDefaults.pm index af38852..000a104 100644 --- a/lib/DBIx/Class/DeploymentHandler/WithReasonableDefaults.pm +++ b/lib/DBIx/Class/DeploymentHandler/WithReasonableDefaults.pm @@ -1,5 +1,5 @@ package DBIx::Class::DeploymentHandler::WithReasonableDefaults; -use Moose::Role; +use Moo::Role; # ABSTRACT: Make default arguments to a few methods sensible