/tmp>env - perl -MDBI -e 'DBI->connect("DBD:MariaDB","","",{PrintError=>1})'
Can't connect to data source 'DBD:MariaDB' because I can't work out what driver to use (it doesn't seem to contain a 'dbi:driver:' prefix and the DBI_DRIVER env var is not set) at -e line 1.
####
$dbh = DBI->connect($data_source, $user, $pass, $driver);
##
##
/tmp>env - DBI_DRIVER=NON::SENSE perl -MDBI -e 'DBI->connect("DBD:MariaDB","","",{PrintError=>1})'
install_driver(NON::SENSE) failed: Can't locate DBD/NON/SENSE.pm in @INC (you may need to install the DBD::NON::SENSE module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 5) line 3.
Perhaps a module that DBD::NON::SENSE requires hasn't been fully installed
at -e line 1.
##
##
/tmp>env - perl -MDBI -e 'print DBI->connect("dbi:SQLite:foo","","",{PrintError=>1})->{PrintError}'
1
/tmp>env - DBI_DRIVER=SQLite perl -MDBI -e 'print DBI->connect("DBD:MariaDB:foo","","",{PrintError=>1})->{PrintError}'
1
/tmp>env - DBI_DRIVER=SQLite perl -MDBI -e 'print DBI->connect("DBD:MariaDB:foo","","",{})->{PrintError}'
1
##
##
/tmp>env - perl -MDBI -e 'print DBI->connect("DBD:MariaDB:foo","","","SQLite")->{PrintError}'
DBI->connect using 'old-style' syntax is deprecated and will be an error in future versions at -e line 1.
/tmp>env - perl -MDBI -e 'print defined DBI->connect("DBD:MariaDB:foo","","","SQLite")->{PrintError}'
DBI->connect using 'old-style' syntax is deprecated and will be an error in future versions at -e line 1.
1
/tmp>env - perl -MDBI -e 'print DBI->connect("DBD:MariaDB:foo","","","SQLite")->{PrintError}+0'
DBI->connect using 'old-style' syntax is deprecated and will be an error in future versions at -e line 1.
0
##
##
/tmp>env - perl -MDBI -e 'print DBI->connect("DBD:MariaDB:foo","","")'
Can't connect to data source 'DBD:MariaDB:foo' because I can't work out what driver to use (it doesn't seem to contain a 'dbi:driver:' prefix and the DBI_DRIVER env var is not set) at -e line 1.
##
##
/tmp>perl -MDBI -e 'print $DBI::VERSION'
1.636