- Timestamp:
- 09/23/07 09:01:31 (16 months ago)
- Location:
- ext/Muldis-DB
- Files:
-
- 3 modified
-
Changes (modified) (1 diff)
-
lib/Muldis/DB/Engine/Example.pm (modified) (3 diffs)
-
lib/Muldis/DB/Validator.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ext/Muldis-DB/Changes
r18100 r18104 106 106 The SYNOPSIS, plus the MDB_50_Validate_Example.t, were minor updated. 107 107 108 * (Validator.pm) Added a &does_ok to Validator.pm, which in the Perl 6 109 Validator.pm is a modified copy of the &isa_ok of Test.pm but it tests 110 with .does rather than .isa; in the Perl 5 Validator.pm, the new 111 &does_ok is just a symbolic alias for the Test::More &isa_ok; in any 112 event, the rest of both versions of Validator.pm now invokes &does_ok 113 rather than &isa_ok, to keep their code bases more similar. 114 108 115 * (SeeAlso.pod) Updated the PROSPECTIVE MULDIS DB EXTENSIONS section 109 116 mainly to bring various names, terminology, and references up to date -
ext/Muldis-DB/lib/Muldis/DB/Engine/Example.pm
r18100 r18104 111 111 112 112 my $result = ::Muldis::DB::Engine::Example::Public::Var.new( 113 :dbms(self), 'sys.Core.Universal.Universal');113 :dbms(self), :decl_type('sys.Core.Universal.Universal') ); 114 114 115 115 # $f.bind_func( :func_name($func_name) ); … … 191 191 192 192 $!dbms = $dbms; 193 $dbms!assoc_vars.{self.WHERE} = self; 193 # $dbms!assoc_vars.{self.WHERE} = self; 194 # weaken $dbms!assoc_vars.{self.WHERE}; 194 195 195 196 # $!var = ::Muldis::DB::Engine::Example::VM::Var.new( … … 200 201 201 202 submethod DESTROY () { 202 $!dbms!assoc_vars.delete( self.WHERE );203 # $!dbms!assoc_vars.delete( self.WHERE ); 203 204 return; 204 205 } -
ext/Muldis-DB/lib/Muldis/DB/Validator.pm
r18100 r18104 21 21 my Muldis::DB::Interface::DBMS $dbms = Muldis::DB::Interface::new_dbms( 22 22 :engine_name($engine_name), :dbms_config($dbms_config) ); 23 isa_ok( $dbms, 'Muldis::DB::Interface::DBMS' );23 does_ok( $dbms, 'Muldis::DB::Interface::DBMS' ); 24 24 25 25 _scenario_foods_suppliers_shipments_v1( $dbms ); … … 39 39 my $src_suppliers 40 40 = $dbms.new_var( :decl_type('sys.Core.Relation.Relation') ); 41 isa_ok( $src_suppliers, 'Muldis::DB::Interface::Var' );41 does_ok( $src_suppliers, 'Muldis::DB::Interface::Var' ); 42 42 my $src_foods 43 43 = $dbms.new_var( :decl_type('sys.Core.Relation.Relation') ); 44 isa_ok( $src_foods, 'Muldis::DB::Interface::Var' );44 does_ok( $src_foods, 'Muldis::DB::Interface::Var' ); 45 45 my $src_shipments 46 46 = $dbms.new_var( :decl_type('sys.Core.Relation.Relation') ); 47 isa_ok( $src_shipments, 'Muldis::DB::Interface::Var' );47 does_ok( $src_shipments, 'Muldis::DB::Interface::Var' ); 48 48 49 49 # Load our example literal source data sets into said Perl-lexicals. … … 138 138 139 139 my $desi_colour = $dbms.new_var( :decl_type('sys.Core.Text.Text') ); 140 isa_ok( $desi_colour, 'Muldis::DB::Interface::Var' );140 does_ok( $desi_colour, 'Muldis::DB::Interface::Var' ); 141 141 $desi_colour.store_ast( :ast([ 'NEText', 'orange' ]) ); 142 142 pass( 'no death from loading desired colour into VM' ); … … 164 164 ); 165 165 pass( 'no death from executing search query' ); 166 isa_ok( $matched_suppl, 'Muldis::DB::Interface::Var' );166 does_ok( $matched_suppl, 'Muldis::DB::Interface::Var' ); 167 167 168 168 my $matched_suppl_ast = $matched_suppl.fetch_ast(); … … 183 183 184 184 say "# debug: orange food suppliers found:"; 185 say "# " ~ $matched_suppl_ast. as_perl();185 say "# " ~ $matched_suppl_ast.perl(); 186 186 187 187 return; 188 } 189 190 ########################################################################### 191 192 # Modified clone of isa_ok from ext/Test/lib/Test.pm, 193 # since we actually want to test with does() rather than isa(). 194 195 sub does_ok (Any|Junction|Pair $ref is rw, Str $expected_type, Str $desc?, 196 :$todo, :$depends) returns Bool is export { 197 my $out 198 := defined($desc) ?? $desc !! "The object does '$expected_type'"; 199 my $test := $ref.does($expected_type); 200 Test::proclaim( 201 $test, $out, $todo, ~($ref.WHAT), $expected_type, $depends ); 188 202 } 189 203
