X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class-DeploymentHandler.git;a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FDeploymentHandler%2FDeployMethod%2FSQL%2FTranslator%2FDeprecated.pm;h=3fcdb57a9f5046ef1d51425544bc9894f23afdf4;hp=72a4939448d138735d8a08148e84fbe818bf976c;hb=97aa9a748e07c9e5875d56bd7d6554e481911c5d;hpb=3885a58b2ce7c1acbeb4896f82c7a5880eabed7a diff --git a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator/Deprecated.pm b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator/Deprecated.pm index 72a4939..3fcdb57 100644 --- a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator/Deprecated.pm +++ b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator/Deprecated.pm @@ -1,38 +1,44 @@ package DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated; + use Moose; -use Method::Signatures::Simple; + +# ABSTRACT: (DEPRECATED) Use this if you are stuck in the past use File::Spec::Functions; -extends 'DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator', +extends 'DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator'; -method _ddl_schema_consume_filenames($type, $version) { +sub _ddl_schema_consume_filenames { + my ($self, $type, $version) = @_; return [$self->_ddl_schema_produce_filename($type, $version)] } -method _ddl_schema_produce_filename($type, $version) { +sub _ddl_schema_produce_filename { + my ($self, $type, $version) = @_; my $filename = ref $self->schema; $filename =~ s/::/-/g; $filename = catfile( - $self->upgrade_directory, "$filename-$version-$type.sql" + $self->script_directory, "$filename-$version-$type.sql" ); return $filename; } -method _ddl_schema_up_produce_filename($type, $versions, $dir) { +sub _ddl_schema_up_produce_filename { + my ($self, $type, $versions, $dir) = @_; my $filename = ref $self->schema; $filename =~ s/::/-/g; $filename = catfile( - $self->upgrade_directory, "$filename-" . join( q(-), @{$versions} ) . "-$type.sql" + $self->script_directory, "$filename-" . join( q(-), @{$versions} ) . "-$type.sql" ); return $filename; } -method _ddl_schema_up_consume_filenames($type, $versions) { +sub _ddl_schema_up_consume_filenames { + my ($self, $type, $versions) = @_; return [$self->_ddl_schema_up_produce_filename($type, $versions)] } @@ -40,8 +46,26 @@ __PACKAGE__->meta->make_immutable; 1; +# vim: ts=2 sw=2 expandtab + __END__ +=head1 DESCRIPTION + +All this module does is override a few parts of +L so that the files generated with +L will work with this out of the box. + +=head1 DEPRECATED + +I begrudgingly made this module (and other related modules) to keep porting +from L relatively simple. I will make changes +to ensure that it works with output from L etc, +but I will not add any new features to it. + +Once I hit major version 1 usage of this module will emit a warning. +On version 2 it will be removed entirely. + =head1 THIS SUCKS Yeah, this old Deprecated thing is a drag. It can't do downgrades, it can only @@ -61,4 +85,30 @@ totally switch! Here's how: } } -vim: ts=2 sw=2 expandtab +=head1 OVERRIDDEN METHODS + +=over + +=item * + +L + +=item * + +L + +=item * + +L + +=item * + +L + +=back + +=head1 SEE ALSO + +This class is an implementation of +L. Pretty much all the +documentation is there.