[Bast-commits] r4555 - in DBIx-Class/0.08/trunk/lib/DBIx/Class: . Schema

lukes at dev.catalyst.perl.org lukes at dev.catalyst.perl.org
Mon Jul 7 13:11:32 BST 2008


Author: lukes
Date: 2008-07-07 13:11:32 +0100 (Mon, 07 Jul 2008)
New Revision: 4555

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm
Log:
moved schema_version from Versioning to core

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm	2008-07-04 12:03:51 UTC (rev 4554)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm	2008-07-07 12:11:32 UTC (rev 4555)
@@ -129,26 +129,6 @@
 __PACKAGE__->mk_classdata('do_backup');
 __PACKAGE__->mk_classdata('do_diff_on_init');
 
-=head2 schema_version
-
-Returns the current schema class' $VERSION; does -not- use $schema->VERSION
-since that varies in results depending on if version.pm is installed, and if
-so the perl or XS versions. If you want this to change, bug the version.pm
-author to make vpp and vxs behave the same.
-
-=cut
-
-sub schema_version {
-  my ($self) = @_;
-  my $class = ref($self)||$self;
-  my $version;
-  {
-    no strict 'refs';
-    $version = ${"${class}::VERSION"};
-  }
-  return $version;
-}
-
 =head2 get_db_version
 
 Returns the version that your database is currently at. This is determined by the values in the

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm	2008-07-04 12:03:51 UTC (rev 4554)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm	2008-07-07 12:11:32 UTC (rev 4555)
@@ -62,6 +62,29 @@
 
 =head1 METHODS
 
+=head2 schema_version
+
+Returns the current schema class' $VERSION
+
+=cut
+
+sub schema_version {
+  my ($self) = @_;
+  my $class = ref($self)||$self;
+
+  # does -not- use $schema->VERSION
+  # since that varies in results depending on if version.pm is installed, and if
+  # so the perl or XS versions. If you want this to change, bug the version.pm
+  # author to make vpp and vxs behave the same.
+
+  my $version;
+  {
+    no strict 'refs';
+    $version = ${"${class}::VERSION"};
+  }
+  return $version;
+}
+
 =head2 register_class
 
 =over 4




More information about the Bast-commits mailing list