sub do_sql { my $this = shift; my $sql = shift || return; my $dbh = $this->get_db_connection(); eval { if ( $sql =~ /^select/i ) { $this->log_internal_notice("executing sql query: $sql"); my $sth = $dbh->prepare( $sql ); my $nmb = $sth->execute(); $this->log_internal_notice( $nmb == 1 ? "1 result" : "$nmb results" ); return $sth; } else { $this->log_notice("executing non-select sql: $sql"); return $dbh->do( $sql ); } }; if ( $@ ) { $this->log_warning("Caught exception executing sql: $@"); return; } } #### my $sth = $my_module_object->do_sql( $sql ) || return "

There are currently no experiment steps in this experiment

";