in reply to Re^4: Use of 'our' considered harmful
in thread Use of 'our' considered harmful

Actually, your code closes the $dbh before you ever execute the query! Where as the our version doesn't. With the our version, the user can use $dbh in other functions, because $dbh is a global.

I'm not saying our is required to do this -- it isn't -- I'm just saying you broke the program by blindly switching to my.

Replies are listed 'Best First'.
Re^6: Use of 'our' considered harmful
by ysth (Canon) on Sep 24, 2004 at 20:37 UTC
    closes $dbh??
      I think he meant, "Closes over an environment with a specific copy of $dbh." And "Closes over" here refers to the process of creating a closure.

      He didn't mean that you're closing the database handle.