in reply to Objet Reference ^%#)#&* dissapers
my $fk = MySqlTools::ForeignKey->new($parms);
the $fk might well resolve to a true value; but is it what you expect? Try dumping the thingy at that point with e.g. Data::Dumper. But I suspect the culprit being in MySqlTools::ForeignKey which you didn't post. Adding debug logging to that one might give some clue.
update:
As I stated earlier, I have very similar methods/helpers for working with Indexes, and their is not a problem there. I've reviewed the code side by side, and I'm stumped.
More often than not that doesn't help, since one is blind to one's own bugs. I suspect some leftovers being in the way, of the sort of your addFks method, which stuffs $fk into an object field and returns $fk. Try logging the return value(s) of your methods.
|
|---|