sub load { my $class = shift; my $id = shift; my $dbh = Some::Class->get_dbh(); my $sth = $dbh->prepare(<<"ENDSQL"); SELECT field1, field2 FROM table WHERE id = ? ENDSQL my ($field1, $field2); eval { # need to figure out why this bind_param isnt working $sth->bind_param(1, $id); $sth->execute(); $sth->bind_col(1, \$field1); $sth->bind_col(2, \$field2); }; if($@){ print "There was a error"; } $sth->fetch(); $sth->finish(); }