run-db.pl - Run SQL
run-sql.pl "select * from mytable where 1=0" run-sql.pl --sql create-table.sql echo "select * from mytable where 1=0" | run-sql.pl
This sets up the database. The following options are recognized:
--user
--password
--dsn
The DBI DSN to use for connecting to the database
--sql
The alternative SQL file to use instead of what is passed on the command line.
--quiet
Output no headers for empty SELECT resultsets
--bool
Set the exit code to 1 if at least one result row was found
--string
Output the (single) column that the query returns as a string without any headers
--format
Use a different formatter for table output. Supported formatters are
tab - output results as tab delimited columns Text::Table - output results as ASCII table Text::Table::Any - output results as various formats
--force
Don't stop on errors
--help
Show this message.
To install DBIx::RunSQL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::RunSQL
CPAN shell
perl -MCPAN -e shell install DBIx::RunSQL
For more information on module installation, please visit the detailed CPAN module installation guide.