in reply to Re^3: Advise on sql table mapping.
in thread Advise on sql table mapping.

I had removed strict and forgot to add it back when I was calling @results from outside the loop.

Just basically studying your code. Thanks btw. This has really helped me greatly.

After all this is over, all that will really have mattered is how we treated each other.

Replies are listed 'Best First'.
Re^5: Advise on sql table mapping.
by Corion (Patriarch) on May 19, 2008 at 21:02 UTC

    I'm not sure what you mean by "calling @results from outside the loop", but if you mean what I think you mean, you might benefit from Coping With Scoping. @results is not visible anymore once find_joins has finished running. Use the return value(s) of find_joins, like I did.

      Actually @results did exist because I had also removed: my @results;

        Which was dumb btw. This code you wrote is really complex. Apparently reading the llama book is just not cutting it. I can modify your code to make it do what I want it to, but I will not use it until I completely understand it and I have been staring at that sub for hours. The function calling itself is a strange and new concept for me.

        What is going on in the for loop?

        for my $link (grep { ! $visited->{$_} } @{$links{$start}}) {

        Amazing. Thanks again for the brain twisting code.

        After all this is over, all that will really have mattered is how we treated each other.