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=6e7a6049142c176073adf3105d1e77d48bfde28b;hb=97aa9a748e07c9e5875d56bd7d6554e481911c5d;hpb=1f0d0633940a59386e5c0ebec602d0650a3694ed diff --git a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator/Deprecated.pm b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator/Deprecated.pm index 6e7a604..3fcdb57 100644 --- a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator/Deprecated.pm +++ b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator/Deprecated.pm @@ -1,20 +1,20 @@ package DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated; + use Moose; # ABSTRACT: (DEPRECATED) Use this if you are stuck in the past -use Method::Signatures::Simple; - use File::Spec::Functions; -require SQL::Translator::Diff; -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; @@ -25,7 +25,8 @@ method _ddl_schema_produce_filename($type, $version) { 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; @@ -36,24 +37,11 @@ method _ddl_schema_up_produce_filename($type, $versions, $dir) { 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)] } -method _generate_final_diff($source_schema, $dest_schema, $db, $sqltargs) { - scalar SQL::Translator::Diff::schema_diff( - $source_schema, $db, - $dest_schema, $db, - $sqltargs - ) -} - -method _default_read_sql_file_as_string($file) { - do { local( @ARGV, $/ ) = $file; <> } # slurp -} - -method _generate_final_sql($sqlt) { scalar $sqlt->translate } - __PACKAGE__->meta->make_immutable; 1; @@ -119,3 +107,8 @@ L =back +=head1 SEE ALSO + +This class is an implementation of +L. Pretty much all the +documentation is there.