view release on metacpan or search on metacpan
lib/Ukigumo/Server.pm view on Meta::CPAN
$self->{dbh} ||= do {
my $conf = $self->config->{DBI} or die "Missing configuration for DBI";
$conf->[3]->{RaiseError} = 1;
$conf->[3]->{sqlite_unicode} = 1 if $self->dbdriver eq 'sqlite';
$conf->[3]->{mysql_enable_utf8} = 1 if $self->dbdriver eq 'mysql';
DBI->connect(@$conf) or die $DBI::errstr;
};
}
sub db {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Suffit/Server/API.pm view on Meta::CPAN
<
{
"algorithms": [ "MD5", "SHA1", "SHA224", "SHA256", "SHA384", "SHA512" ],
"api_version": "1.02",
"authdb": {
"ds": "mysql://localhost/authdb?mysql_auto_reconnect=1&mysql_enable_utf8=1",
"error": "",
"schver": "1.01",
"status": true
},
"base_url": "https://localhost:8695",
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Suffit/AuthDB/Model.pm view on Meta::CPAN
"sqlite:///tmp/test.db?RaiseError=0&PrintError=0&sqlite_unicode=1"
);
# MySQL
my $model = WWW::Suffit::AuthDB::Model->new(
"mysql://user:pass@host/authdb?mysql_auto_reconnect=1&mysql_enable_utf8=1"
);
die($model->error) if $model->error;
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Suffit/Server.pm view on Meta::CPAN
=over 8
=item AuthDBURL, AuthDBURI
AuthDBURI "mysql://user:pass@mysql.example.com/authdb \
?mysql_auto_reconnect=1&mysql_enable_utf8=1"
AuthDBURI "sqlite:///var/lib/myapp/auth.db?sqlite_unicode=1"
Authorization database connect string (Data Source URI)
This directive written in the URI form
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Wiki/Toolkit/Store/Mediawiki.pm view on Meta::CPAN
# Internal method to return the data source string required by DBI.
sub _dsn {
my ($self, $dbname, $dbhost) = @_;
my $dsn = "dbi:mysql:$dbname";
$dsn .= ";mysql_enable_utf8=1" if $self->{_charset}=~/^utf-?8$/i;
$dsn .= ";host=$dbhost" if $dbhost;
return $dsn;
}
view all matches for this distribution
view release on metacpan or search on metacpan
bin/xml_repo.pl view on Meta::CPAN
<hostname> - remote host name or ip address
<port> - remote host port
<attribute> - extra attribute
Examples:
sql::pg:user/pwd@mydb:127.0.0.1;RaiseError => 1,AutoCommit => 0,pg_enable_utf8 => 1
sql::mysql:user/pwd@mydb:127.0.0.1;RaiseError => 1,AutoCommit => 0,mysql_enable_utf8 => 1
sql::oracle:user/pwd@orcl:neutrino:1522;RaiseError => 1,AutoCommit => 0
sql::DBM:dbm_mldbm=Storable;RaiseError => 1,f_dir=> q(/tmp)
-t <c|r> - issue a commit or rollback at the end (default commit)
-i ignore errors (return 0 if exists errors)
)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/omnitool/installer.pm view on Meta::CPAN
my ($dsn, $dbh, $db_name, $sth, $exists, $safe_to_modify);
# try to make the connection
$dsn = qq{DBI:mysql:database=information_schema;host=}.$self->{options}{'database-server'}.qq{;port=3306};
$dbh = DBI->connect($dsn, $self->{options}{'db-username'}, $self->{options}{'db-password'},{ PrintError => 1, RaiseError=>1, mysql_enable_utf8=>8 });
$dbh->{LongReadLen} = 1000000;
# check to see if it has our databases
foreach $db_name ('omnitool','otstatedata','omnitool_applications','omnitool_samples','sample_tools') {
$sth = $dbh->prepare(qq{select CATALOG_NAME from SCHEMATA where SCHEMA_NAME='$db_name'});
view all matches for this distribution