I'm not really sure what the question is, but if your coderef doesn't need access to $self and only needs access to $dbh, then yes, it's a good idea for it to avoid closing over $self.
The case where you'd want it to close over $self instead of $dbh would be if there was something like a $self->switch_database method that set a new database to connect to, and you wanted your coderef to be aware of the switch instead of continuing to point to the old database.
In reply to Re: Avoiding circular references
by tobyink
in thread Avoiding circular references
by frazap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |