in reply to Re^2: Best practices for passing $dbh to subroutines
in thread Best practices for passing $dbh to subroutines

I usually store the handle somewhere deeper in the object, with prepared selects or inserts around. So, the methods look like:
sub add_numbers { my ($self, @params) = @_; $self->{insert_num}->execute(@params); } sub vacuum { my $self = shift; $self->{db}->do('vacuum'); }
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ