Apache2-AuthCookieDBI
view release on metacpan or search on metacpan
lib/Apache2/AuthCookieDBI.pm view on Meta::CPAN
547548549550551552553554555556557558559560561562563564565566567
return
$str
;
}
#-------------------------------------------------------------------------------
# _dbi_connect -- Get a database handle.
sub
_dbi_connect {
my
(
$class
,
$r
,
$config_hash
) =
@_
;
Carp::confess(
'Failed to pass Apache request object'
)
if
not
$r
;
my
(
$pkg
,
$file
,
$line
,
$sub
) =
caller
(1);
my
$info_message
=
"${class}\t_dbi_connect called in $sub at line $line"
;
$class
->logger(
$r
, Apache2::Const::LOG_INFO,
$info_message
,
undef
,
LOG_TYPE_SYSTEM,
$r
->uri );
my
%c
=
$config_hash
?
%$config_hash
:
$class
->_dbi_config_vars(
$r
);
my
$auth_name
=
$r
->auth_name;
# get the crypted password from the users database for this user.
my
$dbh
= DBI->connect_cached(
$c
{
'DBI_DSN'
},
$c
{
'DBI_User'
},
lib/Apache2/AuthCookieDBI.pm view on Meta::CPAN
10971098109911001101110211031104110511061107110811091110111111121113111411151116
Apache2::Const::
LOG_INFO
=>
'info'
,
Apache2::Const::
LOG_NOTICE
=>
'notice'
,
Apache2::Const::
LOG_WARNING
=>
'warn'
,
Apache2::Const::
LOG_ERR
=>
'error'
,
Apache2::Const::
LOG_CRIT
=>
'crit'
,
Apache2::Const::
LOG_ALERT
=>
'alert'
,
Apache2::Const::
LOG_EMERG
=>
'emerg'
,
);
my
$log_method
=
$apache_log_method_for_level
{
$log_level
};
if
( !
$log_method
) {
my
(
$pkg
,
$file
,
$line
,
$sub
) =
caller
(1);
$r
->log_error(
"Unknown log_level '$log_level' passed to logger() from $sub at line $line in $file "
);
$log_method
=
'log_error'
;
}
$r
->
log
->
$log_method
(
@log_args
);
}
1;
( run in 0.584 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )