Perhaps true...though if there is a lot of code, it's going to be a lot of work no matter what (not just creating "a DBI handle"). I imagine theres a lot of code with interpolated varables, e.g. my $sql = <<EOT
select blah, blahblah
from blah_etc
where foo = '$bar'
EOT
For the least amount of work, I might use something like Interpolate and turn that in to something like:my $sql = <<EOT
select blah, blahblah
from blah_etc
where foo = $quote{$bar}
EOT
(with %quote properly defined through Interpolate)
But even that is a lot of tedious work if there is a lot of SQL to change. I could be wrong, but I don't think it would be much more work to just go ahead and use DBI to execute the SQL and return results.
|