3 use Class::Inspector ();
6 use lib 't/cdbi/testlib';
9 # Test that has_many() will load the foreign class.
10 ok !Class::Inspector->loaded( 'Film' );
11 ok eval { Director->has_many( films => 'Film' ); 1; } || diag $@;
13 my $shan_hua = Director->create({
17 my $inframan = Film->create({
19 Director => "Shan Hua",
21 my $guillotine2 = Film->create({
22 Title => "Flying Guillotine 2",
23 Director => "Shan Hua",
25 my $guillotine = Film->create({
26 Title => "Master of the Flying Guillotine",
27 Director => "Yu Wang",
30 is_deeply [sort $shan_hua->films], [sort $inframan, $guillotine2];