[Catalyst-commits] r9364 - trunk/Catalyst-Example-InstantCRUD
zby at dev.catalyst.perl.org
zby at dev.catalyst.perl.org
Fri Feb 20 15:17:36 GMT 2009
Author: zby
Date: 2009-02-20 15:17:36 +0000 (Fri, 20 Feb 2009)
New Revision: 9364
Added:
trunk/Catalyst-Example-InstantCRUD/test_for_loader.pl
Log:
test for loader
Added: trunk/Catalyst-Example-InstantCRUD/test_for_loader.pl
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/test_for_loader.pl (rev 0)
+++ trunk/Catalyst-Example-InstantCRUD/test_for_loader.pl 2009-02-20 15:17:36 UTC (rev 9364)
@@ -0,0 +1,23 @@
+use strict;
+use warnings;
+use Data::Dumper;
+use DBIx::Class::Schema::Loader 'make_schema_at';
+
+my $file = 'dvdzbr.db';
+make_schema_at( 'AA', {}, [ "dbi:SQLite:dbname=$file" ], );
+
+
+my $schema = AA->connect();
+
+for my $s ( $schema->sources ) {
+ my $source = $schema->source($s);
+ my @relationships = $source->relationships;
+ warn $s;
+ for my $rel (@relationships) {
+ warn $rel;
+ my $info = $source->relationship_info($rel);
+ warn Dumper( $info ); use Data::Dumper;
+ }
+}
+
+
More information about the Catalyst-commits
mailing list