script/query_db.pl untested

filter: Statementstmt 0.0% 0 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 11 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/local/bin/perl
2 use Getopt::Long qw(:config no_ignore_case);
3 use SimpleDBI;
4 GetOptions (\%h,
5 'type|t=s',
6 'host|h=s',
7 'usr|u=s',
8 'passwd|p=s',
9 'port|P=s',
10 'db|d=s',
11 'query|e=s',
12 'file|f=s',
13 'sep|s=s',
14 'charset|c=s',
15 'write_head|H=i',
16 );
17  
18 my $dbi = SimpleDBI->new(%h);
19 $dbi->query_db($h{query}, %$dbi, result_type => 'file');