parser improvements and test correction
Guillermo Roditi [Mon, 25 Aug 2008 21:38:27 +0000 (21:38 +0000)]
lib/SQL/Translator/Parser/DBIx/Class.pm
t/99dbic_sqlt_parser.t

index ae14d0b..5b313ba 100644 (file)
@@ -69,11 +69,9 @@ sub parse {
     for my $moniker (@monikers){
       my $source = $dbicschema->source($moniker);
       next if $source->is_virtual;
-       if ( $source->isa('DBIx::Class::ResultSource::Table') ||
-              $source->isa('DBIx::Class::ResultSourceProxy::Table') ) {
+       if ( $source->isa('DBIx::Class::ResultSource::Table') ) {
          push(@table_monikers, $moniker);
-      } elsif( $source->isa('DBIx::Class::ResultSource::View') ||
-            $source->isa('DBIx::Class::ResultSourceProxy::View') ){
+      } elsif( $source->isa('DBIx::Class::ResultSource::View') ){
          push(@view_monikers, $moniker);
       }
     }
index 34547db..42eeb92 100644 (file)
@@ -9,7 +9,7 @@ BEGIN {
     eval "use DBD::mysql; use SQL::Translator 0.09;";
     plan $@
         ? ( skip_all => 'needs SQL::Translator 0.09 for testing' )
-        : ( tests => 99 );
+        : ( tests => 102 );
 }
 
 my $schema = DBICTest->init_schema();