switched to namespaces
luke [Mon, 25 May 2009 22:25:35 +0000 (22:25 +0000)]
t/lib/DBICTest/Schema.pm
t/lib/DBICTest/Schema/Result/Artist.pm [moved from t/lib/DBICTest/Schema/Artist.pm with 81% similarity]
t/lib/DBICTest/Schema/Result/CD.pm [moved from t/lib/DBICTest/Schema/CD.pm with 71% similarity]
t/lib/DBICTest/Schema/Result/CD_to_Producer.pm [moved from t/lib/DBICTest/Schema/CD_to_Producer.pm with 74% similarity]
t/lib/DBICTest/Schema/Result/Producer.pm [moved from t/lib/DBICTest/Schema/Producer.pm with 90% similarity]
t/lib/DBICTest/Schema/Result/Tag.pm [moved from t/lib/DBICTest/Schema/Tag.pm with 77% similarity]
t/lib/DBICTest/Schema/Result/Track.pm [moved from t/lib/DBICTest/Schema/Track.pm with 87% similarity]

index 350eecc..0142bc9 100644 (file)
@@ -5,6 +5,6 @@ use base qw/DBIx::Class::Schema/;
 
 no warnings qw/qw/;
 
-__PACKAGE__->load_classes(qw/Artist CD Track Tag Producer CD_to_Producer/);
+__PACKAGE__->load_namespaces;
 
 1;
similarity index 81%
rename from t/lib/DBICTest/Schema/Artist.pm
rename to t/lib/DBICTest/Schema/Result/Artist.pm
index 594a76d..06f36fd 100644 (file)
@@ -1,5 +1,5 @@
 package # hide from PAUSE 
-    DBICTest::Schema::Artist;
+    DBICTest::Schema::Result::Artist;
 
 use base 'DBIx::Class::Core';
 
@@ -18,7 +18,7 @@ __PACKAGE__->add_columns(
 __PACKAGE__->set_primary_key('artistid');
 
 __PACKAGE__->has_many(
-    cds => 'DBICTest::Schema::CD', undef,
+    cds => 'DBICTest::Schema::Result::CD', undef,
     { order_by => 'year' },
 );
 
similarity index 71%
rename from t/lib/DBICTest/Schema/CD.pm
rename to t/lib/DBICTest/Schema/Result/CD.pm
index a6f084f..60dbd38 100644 (file)
@@ -1,5 +1,5 @@
 package # hide from PAUSE 
-    DBICTest::Schema::CD;
+    DBICTest::Schema::Result::CD;
 
 use base 'DBIx::Class::Core';
 
@@ -24,15 +24,15 @@ __PACKAGE__->add_columns(
 __PACKAGE__->set_primary_key('cdid');
 __PACKAGE__->add_unique_constraint([ qw/artist title/ ]);
 
-__PACKAGE__->belongs_to( artist => 'DBICTest::Schema::Artist' );
+__PACKAGE__->belongs_to( artist => 'DBICTest::Schema::Result::Artist' );
 
-__PACKAGE__->has_many( tracks => 'DBICTest::Schema::Track' );
+__PACKAGE__->has_many( tracks => 'DBICTest::Schema::Result::Track' );
 __PACKAGE__->has_many(
-    tags => 'DBICTest::Schema::Tag', undef,
+    tags => 'DBICTest::Schema::Result::Tag', undef,
     { order_by => 'tag' },
 );
 __PACKAGE__->has_many(
-    cd_to_producer => 'DBICTest::Schema::CD_to_Producer' => 'cd'
+    cd_to_producer => 'DBICTest::Schema::Result::CD_to_Producer' => 'cd'
 );
 
 __PACKAGE__->many_to_many( producers => cd_to_producer => 'producer' );
similarity index 74%
rename from t/lib/DBICTest/Schema/CD_to_Producer.pm
rename to t/lib/DBICTest/Schema/Result/CD_to_Producer.pm
index 117a590..a40d605 100644 (file)
@@ -1,5 +1,5 @@
 package # hide from PAUSE 
-    DBICTest::Schema::CD_to_Producer;
+    DBICTest::Schema::Result::CD_to_Producer;
 
 use base 'DBIx::Class::Core';
 
@@ -11,12 +11,12 @@ __PACKAGE__->add_columns(
 __PACKAGE__->set_primary_key(qw/cd producer/);
 
 __PACKAGE__->belongs_to(
-  'cd', 'DBICTest::Schema::CD',
+  'cd', 'DBICTest::Schema::Result::CD',
   { 'foreign.cdid' => 'self.cd' }
 );
 
 __PACKAGE__->belongs_to(
-  'producer', 'DBICTest::Schema::Producer',
+  'producer', 'DBICTest::Schema::Result::Producer',
   { 'foreign.producerid' => 'self.producer' }
 );
 
similarity index 90%
rename from t/lib/DBICTest/Schema/Producer.pm
rename to t/lib/DBICTest/Schema/Result/Producer.pm
index 036f9f2..4a727dd 100644 (file)
@@ -1,5 +1,5 @@
 package # hide from PAUSE 
-    DBICTest::Schema::Producer;
+    DBICTest::Schema::Result::Producer;
 
 use base 'DBIx::Class::Core';
 
similarity index 77%
rename from t/lib/DBICTest/Schema/Tag.pm
rename to t/lib/DBICTest/Schema/Result/Tag.pm
index b75c2ef..6a6c451 100644 (file)
@@ -1,5 +1,5 @@
 package # hide from PAUSE 
-    DBICTest::Schema::Tag;
+    DBICTest::Schema::Result::Tag;
 
 use base qw/DBIx::Class::Core/;
 
@@ -19,6 +19,6 @@ __PACKAGE__->add_columns(
 );
 __PACKAGE__->set_primary_key('tagid');
 
-__PACKAGE__->belongs_to( cd => 'DBICTest::Schema::CD' );
+__PACKAGE__->belongs_to( cd => 'DBICTest::Schema::Result::CD' );
 
 1;
similarity index 87%
rename from t/lib/DBICTest/Schema/Track.pm
rename to t/lib/DBICTest/Schema/Result/Track.pm
index 3f224d5..f243e81 100644 (file)
@@ -1,5 +1,5 @@
 package # hide from PAUSE 
-    DBICTest::Schema::Track;
+    DBICTest::Schema::Result::Track;
 
 use base 'DBIx::Class::Core';
 __PACKAGE__->load_components(qw/InflateColumn::DateTime/);
@@ -32,6 +32,6 @@ __PACKAGE__->set_primary_key('trackid');
 __PACKAGE__->add_unique_constraint([ qw/cd position/ ]);
 __PACKAGE__->add_unique_constraint([ qw/cd title/ ]);
 
-__PACKAGE__->belongs_to( cd => 'DBICTest::Schema::CD' );
+__PACKAGE__->belongs_to( cd => 'DBICTest::Schema::Result::CD' );
 
 1;