# This is $sth->execute sub execute { my $sth = shift; .... my $req = BigHairyDatabaseInteraction->new(...); local $SIG{INT} = sub { $req->handleInterrupt }; $req->execute; # When $req->excute comes back the entire query # has been processed, and all the rows are in $req. ... }