open(FILE, "$tdir/person.txt") || die "Couldn't open $tdir/person.txt : $!";
eq_or_diff <FILE>, qq{Table: person
Primary Key: person_id
- Foriegn Keys:
+ Foreign Keys:
Data Fields: name, age, weight, iq, description
}
, "person.txt looks right";
+close(FILE);
open(FILE, "$tdir/pet.txt") || die "Couldn't open $tdir/pet.txt : $!";
eq_or_diff <FILE>, qq{Table: pet
Primary Key: pet_id, person_id
- Foriegn Keys:
+ Foreign Keys:
Data Fields: name, age
}
-, "person.txt looks right";
+, "pet.txt looks right";
+close(FILE);
print $out if DEBUG;
__DATA__
Table: person
Primary Key: person_id
- Foriegn Keys:
+ Foreign Keys:
Data Fields: name, age, weight, iq, description
Table: pet
Primary Key: pet_id, person_id
- Foriegn Keys:
+ Foreign Keys:
Data Fields: name, age
Table: [% table %]
Primary Key: [% table.pkey_fields.join(", ") %]
- Foriegn Keys: [% table.key_fields.join(", ") %]
+ Foreign Keys: [% table.key_fields.join(", ") %]
Data Fields: [% table.data_fields.join(", ") %]