Fix documentation for in the Cookbook
Arthur Axel 'fREW' Schmidt [Sun, 10 Jul 2011 06:19:44 +0000 (01:19 -0500)]
Changes
lib/DBIx/Class/DeploymentHandler/Cookbook/CustomResultSource.pod

diff --git a/Changes b/Changes
index 8de1fd5..c9a9b92 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
 Revision history for {{$dist->name}}
 
 {{$NEXT}}
+       - Fix documentation for in the Cookbook (moltar)
 
 0.001005  2011-04-13 15:21:08 CST6CDT
        - Add _any "version" for running code for all versions
index 2f1b79d..42cf2d0 100644 (file)
@@ -72,17 +72,19 @@ table being set on the original result.
  sub prepare_version_storage_install {
    my $self = shift;
 
-   $self->prepare_resultsource_install(
-     $self->version_storage->version_rs->result_source
-   );
+   $self->prepare_resultsource_install({
+       result_source => $self->version_storage->version_rs->result_source
+   });
  }
 
  sub install_version_storage {
    my $self = shift;
 
-   $self->install_resultsource(
-     $self->version_storage->version_rs->result_source
-   );
+   my $version = (shift || {})->{version} || $self->schema_version;
+   $self->install_resultsource({
+       result_source => $self->version_storage->version_rs->result_source,
+       version       => $version,
+   });
  }
 
  sub prepare_install {