view release on metacpan or search on metacpan
AuthCookieDBI.pm view on Meta::CPAN
#===============================================================================
# P R I V A T E F U N C T I O N S
#===============================================================================
#-------------------------------------------------------------------------------
# _log_not_set -- Log that a particular authentication variable was not set.
sub _log_not_set {
my ( $r, $variable ) = @_;
my $auth_name = $r->auth_name;
return $r->log_error(
"Apache::AuthCookieDBI: $variable not set for auth realm
$auth_name", $r->uri
AuthCookieDBI.pm view on Meta::CPAN
user information. This is required and has no default value.
=cut
unless ( $c{DBI_DSN} = _dir_config_var $r, 'DBI_DSN' ) {
_log_not_set $r, 'DBI_DSN';
return;
}
=item C<WhateverDBI_SecretKey>
AuthCookieDBI.pm view on Meta::CPAN
=cut
unless ( $c{DBI_SecretKey} = _dir_config_var $r, 'DBI_SecretKey'
or _dir_config_var $r, 'DBI_SecretKeyFile' )
{
_log_not_set $r, 'DBI_SecretKey or DBI_SecretKeyFile';
return;
}
=item C<WhatEverDBI_User>
AuthCookieDBI.pm view on Meta::CPAN
=cut
unless ( $c{DBI_secretkeyfile} = _dir_config_var $r, 'DBI_SecretKeyFile'
or _dir_config_var $r, 'DBI_SecretKey' )
{
_log_not_set $r, 'DBI_SecretKeyFile or DBI_SecretKey';
return;
}
=item C<WhatEverDBI_EncryptionType>
view all matches for this distribution
view release on metacpan or search on metacpan
AuthCookieDBIRadius.pm view on Meta::CPAN
#===============================================================================
# F U N C T I O N D E C L A R A T I O N S
#===============================================================================
sub _log_not_set($$);
sub _dir_config_var($$);
sub _dbi_config_vars($);
sub _now_year_month_day_hour_minute_second();
sub _percent_encode($);
sub _percent_decode($);
AuthCookieDBIRadius.pm view on Meta::CPAN
#===============================================================================
# P R I V A T E F U N C T I O N S
#===============================================================================
#-------------------------------------------------------------------------------
# _log_not_set -- Log that a particular authentication variable was not set.
sub _log_not_set($$)
{
my( $r, $variable ) = @_;
my $auth_name = $r->auth_name;
$r->log_error( "Apache::AuthCookieDBIRadius: $variable not set for auth realm
$auth_name", $r->uri );
AuthCookieDBIRadius.pm view on Meta::CPAN
#Specifies the DSN for DBI for the database you wish to connect to retrieve
#user information. This is required and has no default value.
unless ( $c{ DBI_DSN } = _dir_config_var $r, 'DBI_DSN' )
{
_log_not_set $r, 'DBI_DSN';
return undef;
}
#<WhatEverDBI_User>
#The user to log into the database as. This is not required and
AuthCookieDBIRadius.pm view on Meta::CPAN
#can change it and restart the server, (maybe daily), which will invalidate
#all prior-issued tickets.
unless ( $c{ DBI_secretkeyfile } = _dir_config_var $r, 'DBI_SecretKeyFile' )
{
_log_not_set $r, 'DBI_SecretKeyFile';
return undef;
}
#<WhatEverDBI_EncryptionType>
#What kind of encryption to use to prevent the user from looking at the fields
view all matches for this distribution
view release on metacpan or search on metacpan
AuthCookieLDAP.pm view on Meta::CPAN
#===============================================================================
# F U N C T I O N D E C L A R A T I O N S
#===============================================================================
sub _log_not_set($$);
sub _dir_config_var($$);
sub _dbi_config_vars($);
sub _now_year_month_day_hour_minute_second();
sub _percent_encode($);
sub _percent_decode($);
AuthCookieLDAP.pm view on Meta::CPAN
#===============================================================================
# P R I V A T E F U N C T I O N S
#===============================================================================
#-------------------------------------------------------------------------------
# _log_not_set -- Log that a particular authentication variable was not set.
sub _log_not_set($$)
{
my( $r, $variable ) = @_;
my $auth_name = $r->auth_name;
$r->log_error( "Apache::AuthCookieLDAP: $variable not set for auth realm
$auth_name", $r->uri );
AuthCookieLDAP.pm view on Meta::CPAN
user information. This is required and has no default value.
=cut
unless ( $c{ LDAP_DN } = _dir_config_var $r, 'LDAP_DN' ) {
_log_not_set $r, 'LDAP_DN';
return undef;
}
=item C<WhatEverLDAP_user>
AuthCookieLDAP.pm view on Meta::CPAN
user information. This is required and has no default value.
=cut
unless ( $c{ LDAP_user } = _dir_config_var $r, 'LDAP_user' ) {
_log_not_set $r, 'LDAP_user';
return undef;
}
=item C<WhatEverLDAP_host>
The host to connect to. This is not required and defaults to localhost.
AuthCookieLDAP.pm view on Meta::CPAN
=cut
unless (
$c{ LDAP_secretkeyfile } = _dir_config_var $r, 'LDAP_SecretKeyFile'
) {
_log_not_set $r, 'LDAP_SecretKeyFile';
return undef;
}
=item C<WhatEverLDAP_EncryptionType>
AuthCookieLDAP.pm view on Meta::CPAN
user information. This is required and has no default value.
=cut
unless ( $c{ DBI_DSN } = _dir_config_var $r, 'DBI_DSN' ) {
_log_not_set $r, 'DBI_DSN';
return undef;
}
=item C<WhatEverDBI_User>
view all matches for this distribution
view release on metacpan or search on metacpan
AuthCookiePAM.pm view on Meta::CPAN
#===============================================================================
# F U N C T I O N D E C L A R A T I O N S
#===============================================================================
sub _log_not_set($$);
sub _dir_config_var($$);
sub _config_vars($);
sub _now_year_month_day_hour_minute_second();
sub _percent_encode($);
sub _percent_decode($);
AuthCookiePAM.pm view on Meta::CPAN
#===============================================================================
# P R I V A T E F U N C T I O N S
#===============================================================================
#-------------------------------------------------------------------------------
# _log_not_set -- Log that a particular authentication variable was not set.
sub _log_not_set($$)
{
my( $r, $variable ) = @_;
my $auth_name; $auth_name = $r->auth_name;
$r->log_error( "Apache::AuthCookiePAM: $variable not set for auth realm
$auth_name", $r->uri );
AuthCookiePAM.pm view on Meta::CPAN
=cut
unless (
$c{ PAM_secretkeyfile } = _dir_config_var $r, 'PAM_SecretKeyFile'
) {
_log_not_set $r, 'PAM_SecretKeyFile';
return undef;
}
=item C<WhatEverPAM_SessionLifetime>
view all matches for this distribution
view release on metacpan or search on metacpan
Session/Session.pm view on Meta::CPAN
will then, if the user credentials check out, populate $r->notes('SESSION')
with the session identifier that the user passed back via the headers.
So, when the PerlAuthzHandler, PerlFixupHandler and
PerlHandler are run, $r->notes('SESSION') is the real session id,
as gleaned from the headers, and _not_ what was placed into it by
the user via a PerlInitHandler or whatever other mechanism one uses
to generate a session.
an alternative interface is to have any handler that wants
the current session identifier instantiate a new
view all matches for this distribution
view release on metacpan or search on metacpan
smb/.svn/text-base/Smb.xs.svn-base view on Meta::CPAN
#ifdef __cplusplus
}
#endif
static int
not_here(s)
char *s;
{
croak("%s not implemented on this architecture", s);
return -1;
}
smb/.svn/text-base/Smb.xs.svn-base view on Meta::CPAN
case 'N':
if (strEQ(name, "NTV_LOGON_ERROR"))
#ifdef NTV_LOGON_ERROR
return NTV_LOGON_ERROR;
#else
goto not_there;
#endif
if (strEQ(name, "NTV_NO_ERROR"))
#ifdef NTV_NO_ERROR
return NTV_NO_ERROR;
#else
goto not_there;
#endif
if (strEQ(name, "NTV_PROTOCOL_ERROR"))
#ifdef NTV_PROTOCOL_ERROR
return NTV_PROTOCOL_ERROR;
#else
goto not_there;
#endif
if (strEQ(name, "NTV_SERVER_ERROR"))
#ifdef NTV_SERVER_ERROR
return NTV_SERVER_ERROR;
#else
goto not_there;
#endif
break;
case 'O':
break;
case 'P':
smb/.svn/text-base/Smb.xs.svn-base view on Meta::CPAN
break;
}
errno = EINVAL;
return 0;
not_there:
errno = ENOENT;
return 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/ConfigParser/Directive.pm view on Meta::CPAN
=back
=cut
sub directive_value_is_not_dev_null {
!is_dev_null($_[0]);
}
sub directive_value_is_not_dev_null_and_pipe {
if (is_dev_null($_[0])) {
return 0;
}
return $_[0] !~ /^\s*\|/;
}
sub directive_value_is_not_dev_null_and_pipe_and_syslog {
if (is_dev_null($_[0])) {
return 0;
}
return $_[0] !~ /^\s*(?:(?:\|)|(?:syslog(?::[a-zA-Z0-9]+)?))/;
lib/Apache/ConfigParser/Directive.pm view on Meta::CPAN
# position(s) that contains the file or directory path.
# string =~ /^\d+/ a single element that contains a path
# string =~ /^-\d+/ multiple elements, first is abs(\d+)
# 1 1 if the paths the directive accepts can be absolute and
# relative, 0 if they can only be absolute
# 2 a subroutine reference to directive_value_is_not_dev_null,
# directive_value_is_not_dev_null_and_pipe or
# directive_value_is_not_dev_null_and_pipe_and_syslog.
my %directive_info = (
AccessConfig => ['0',
1,
\&directive_value_is_not_dev_null],
AuthDBGroupFile => ['0',
0,
\&directive_value_is_not_dev_null],
AuthDBMGroupFile => ['0',
0,
\&directive_value_is_not_dev_null],
AuthDBMUserFile => ['0',
0,
\&directive_value_is_not_dev_null],
AuthDBUserFile => ['0',
0,
\&directive_value_is_not_dev_null],
AuthDigestFile => ['0',
0,
\&directive_value_is_not_dev_null],
AgentLog => ['0',
0,
\&directive_value_is_not_dev_null_and_pipe],
AuthGroupFile => ['0',
1,
\&directive_value_is_not_dev_null],
AuthUserFile => ['0',
1,
\&directive_value_is_not_dev_null],
CacheRoot => ['0',
0,
\&directive_value_is_not_dev_null],
CookieLog => ['0',
1,
\&directive_value_is_not_dev_null],
CoreDumpDirectory => ['0',
0,
\&directive_value_is_not_dev_null],
CustomLog => ['0',
1,
\&directive_value_is_not_dev_null_and_pipe],
Directory => ['0',
0,
\&directive_value_is_not_dev_null],
DocumentRoot => ['0',
0,
\&directive_value_is_not_dev_null],
ErrorLog => ['0',
1,
\&directive_value_is_not_dev_null_and_pipe_and_syslog],
Include => ['0',
1,
\&directive_value_is_not_dev_null],
IncludeOptional => ['0',
1,
\&directive_value_is_not_dev_null],
LoadFile => ['-0',
1,
\&directive_value_is_not_dev_null],
LoadModule => ['1',
1,
\&directive_value_is_not_dev_null],
LockFile => ['0',
1,
\&directive_value_is_not_dev_null],
MMapFile => ['0',
0,
\&directive_value_is_not_dev_null],
MimeMagicFile => ['0',
1,
\&directive_value_is_not_dev_null],
PidFile => ['0',
1,
\&directive_value_is_not_dev_null],
RefererLog => ['0',
1,
\&directive_value_is_not_dev_null_and_pipe],
ResourceConfig => ['0',
1,
\&directive_value_is_not_dev_null],
RewriteLock => ['0',
0,
\&directive_value_is_not_dev_null],
ScoreBoardFile => ['0',
1,
\&directive_value_is_not_dev_null],
ScriptLog => ['0',
1,
\&directive_value_is_not_dev_null],
ServerRoot => ['0',
0,
\&directive_value_is_not_dev_null],
TransferLog => ['0',
1,
\&directive_value_is_not_dev_null_and_pipe],
TypesConfig => ['0',
1,
\&directive_value_is_not_dev_null]);
# Set up the three exported hashes using the information in
# %directive_info. Use lowercase directive names.
foreach my $key (keys %directive_info) {
my $ref = $directive_info{$key};
view all matches for this distribution
view release on metacpan or search on metacpan
ContentHandler.pm view on Meta::CPAN
: $self->url(-absolute=>1));
$self->{title} = 'Untitled Application';
$self->{subtitle} = '';
$self->{action} = $self->arg('action');
$self->{default_action} = 'does_not_exist';
$self->{debug} = $self->arg('debug') || 0;
$self->{error} = {};
$self->{redirect} = '';
$self->{noprint} = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
Resumable.pm view on Meta::CPAN
### Check is there is an incoming if-none-match header
my $if_none_match = $req->header_in('If-None-Match') ;
if ($if_none_match eq $etag)
{
### send not_modified headers in case file doesn't have changed
### and return
$req->status (304) ;
$req->send_http_header ;
return OK ;
}
view all matches for this distribution
view release on metacpan or search on metacpan
nextchar|||
ninstr|||
no_bareword_allowed|||
no_fh_allowed|||
no_op|||
not_a_number|||
nothreadhook||5.008000|
nuke_stacks|||
num_overflow|||n
oopsAV|||
oopsCV|||
# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
# define PERL_PATCHLEVEL_H_IMPLICIT
# include <patchlevel.h>
# endif
# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
/* Replace: 1 */
# define PERL_VERSION PATCHLEVEL
view all matches for this distribution
view release on metacpan or search on metacpan
t/boilerplate.t view on Meta::CPAN
use strict;
use warnings;
use Test::More tests => 3;
sub not_in_file_ok {
my ($filename, %regex) = @_;
open my $fh, "<", $filename
or die "couldn't open $filename for reading: $!";
my %violated;
t/boilerplate.t view on Meta::CPAN
} else {
pass("$filename contains no boilerplate text");
}
}
not_in_file_ok(README =>
"The README is used..." => qr/The README is used/,
"'version information here'" => qr/to provide version information/,
);
not_in_file_ok(Changes =>
"placeholder date/time" => qr(Date/time)
);
sub module_boilerplate_ok {
my ($module) = @_;
not_in_file_ok($module =>
'the great new $MODULENAME' => qr/ - The great new /,
'boilerplate description' => qr/Quick summary of what the module/,
'stub function definition' => qr/function[12]/,
);
}
view all matches for this distribution
view release on metacpan or search on metacpan
'EXISTS' => $keeperr,
'FETCH' => { O=>0x0404 },
'FIRSTKEY' => $keeperr,
'NEXTKEY' => $keeperr,
'STORE' => { O=>0x0418 | 0x4 },
_not_impl => undef,
can => { O=>0x0100 }, # special case, see dispatch
debug => { U =>[1,2,'[$debug_level]'], O=>0x0004 }, # old name for trace
dump_handle => { U =>[1,3,'[$message [, $level]]'], O=>0x0004 },
err => $keeperr,
errstr => $keeperr,
DBD::_::common; # ====== Common base class methods ======
use strict;
# methods common to all handle types:
sub _not_impl {
my ($h, $method) = @_;
$h->trace_msg("Driver does not implement the $method method.\n");
return; # empty list / undef
}
$cache->{$key} = $sth if $sth;
return $sth;
}
sub ping {
shift->_not_impl('ping');
"0 but true"; # special kind of true 0
}
sub begin_work {
my $dbh = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
"Apache::Mmap %x:\naddr: %x\tlen: %d\tcur: %d\noff: %d\tprot: %d\tflags: %d\n",
m, m->addr, m->len, m->cur, m->off, m->prot, m->flags );
}
static int
not_here(s)
char *s;
{
croak("%s not implemented on this architecture", s);
return -1;
}
case 'M':
if (strEQ(name, "MAP_ANON"))
#ifdef MAP_ANON
return MAP_ANON;
#else
goto not_there;
#endif
if (strEQ(name, "MAP_ANONYMOUS"))
#ifdef MAP_ANONYMOUS
return MAP_ANONYMOUS;
#else
goto not_there;
#endif
if (strEQ(name, "MAP_FILE"))
#ifdef MAP_FILE
return MAP_FILE;
#else
goto not_there;
#endif
if (strEQ(name, "MAP_PRIVATE"))
#ifdef MAP_PRIVATE
return MAP_PRIVATE;
#else
goto not_there;
#endif
if (strEQ(name, "MAP_SHARED"))
#ifdef MAP_SHARED
return MAP_SHARED;
#else
goto not_there;
#endif
break;
case 'P':
if (strEQ(name, "PROT_EXEC"))
#ifdef PROT_EXEC
return PROT_EXEC;
#else
goto not_there;
#endif
if (strEQ(name, "PROT_NONE"))
#ifdef PROT_NONE
return PROT_NONE;
#else
goto not_there;
#endif
if (strEQ(name, "PROT_READ"))
#ifdef PROT_READ
return PROT_READ;
#else
goto not_there;
#endif
if (strEQ(name, "PROT_WRITE"))
#ifdef PROT_WRITE
return PROT_WRITE;
#else
goto not_there;
#endif
break;
default:
break;
}
errno = EINVAL;
return 0;
not_there:
errno = ENOENT;
return 0;
}
MODULE = Apache::Mmap PACKAGE = Apache::Mmap
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
cvs -d $(CVSROOT) tag v$(VERSION_SYM) .
@echo update Module.pm VERSION now
EOF
}
my %not_imp;
BEGIN {
%not_imp = map {$_,1} qw{
child_init
child_exit
init
create_dir_config
merge_dir_config
Makefile.PL view on Meta::CPAN
my $fh = IO::File->new(">$file") or
die "can't open $file $!";
for my $handler (Apache::Module->methods) {
my($type, $trans);
if ($not_imp{$handler}) {
$type = "int";
$trans = "member_boolean";
}
else {
$type = "SV *";
view all matches for this distribution
view release on metacpan or search on metacpan
$log_contents=<$fh>;
}
close $fh;
ok( ($log_contents =~ /\Q$bad_file_msg\E$/m) ? 1 : 0);
# This should be fixed, since we dont actually have the script name expected
ok( ($log_contents =~ /^\Q$no_par_file_msg\E.*?not_found.par$/m) ? 1 : 0);
ok( ($log_contents =~ /^\Q$no_par_dir_msg\E.*?not_dir$/m) ? 1 : 0);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/PageKit.pm view on Meta::CPAN
$apr->headers_out->{Location} = $pk->{page_id} . '/';
return REDIRECT;
}
$pk->{page_id} = $config->uri_match($pk->{page_id})
|| $config->get_global_attr('not_found_page')
|| $model->pkit_get_default_page;
unless ($pk->page_exists($pk->{page_id})){
# if not_found_page is static, then return DECLINED...
$filename = $pk->static_page_exists($pk->{page_id});
}
}}
if ($filename){
my $require_login = $config->get_page_attr($pk->{page_id},'require_login') || 'no';
lib/Apache/PageKit.pm view on Meta::CPAN
else {
# check if cookies should be set
my $pkit_check_cookie = $apr->param('pkit_check_cookie');
if(defined($pkit_check_cookie) && $pkit_check_cookie eq 'on'){
# cookies should be set but aren't.
if($config->get_global_attr('cookies_not_set_page')){
# display "cookies are not set" error page.
$pk->{page_id} = $config->get_global_attr('cookies_not_set_page');
$pk->{browser_cache} = 'no';
} else {
# display login page with error message
$pk->{page_id} = $config->get_global_attr('login_page');
view all matches for this distribution
view release on metacpan or search on metacpan
RequestNotes.pm view on Meta::CPAN
plan on uploading files bigger than 1K, you will need to the override
the default value.
$Apache::RequestNotes:err is set if libapreq reports a problem
parsing the form data, thus it can be used to verify whether $input
and $uploads contain valid objects. Apache::RequestNotes will _not_
return SERVER_ERROR in the event libapreq encounters an error. This
may change in future releases.
Verbose debugging is enabled by setting the variable
$Apache::RequestNotes::DEBUG to 1 or greater. To turn off all debug
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SWIT/Test/Apache.pm view on Meta::CPAN
sub swit_run {
my ($class, $non_config_func) = @_;
my $top_dir = abs_path(dirname($0) . "/../");
my $not_config = (@ARGV && $ARGV[0] ne '-config');
push @ARGV, '-top_dir', $top_dir;
Check_For_Run_Server(\@ARGV);
$non_config_func->() if ($non_config_func && $not_config);
$ENV{SWIT_HAS_APACHE} = 1;
__PACKAGE__->new->run(@ARGV);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/langs/en.js view on Meta::CPAN
update:"Update",
cancel:"Cancel",
close:"Close",
browse:"Browse",
class_name:"Class",
not_set:"-- Not set --",
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
invalid_data:"Error: Invalid values entered, these are marked in red.",
more_colors:"More colors"
view all matches for this distribution
view release on metacpan or search on metacpan
t/boilerplate.t view on Meta::CPAN
use strict;
use warnings;
use Test::More tests => 4;
sub not_in_file_ok {
my ($filename, %regex) = @_;
open( my $fh, '<', $filename )
or die "couldn't open $filename for reading: $!";
my %violated;
t/boilerplate.t view on Meta::CPAN
}
}
sub module_boilerplate_ok {
my ($module) = @_;
not_in_file_ok($module =>
'the great new $MODULENAME' => qr/ - The great new /,
'boilerplate description' => qr/Quick summary of what the module/,
'stub function definition' => qr/function[12]/,
);
}
TODO: {
local $TODO = "Need to replace the boilerplate text";
not_in_file_ok(README =>
"The README is used..." => qr/The README is used/,
"'version information here'" => qr/to provide version information/,
);
not_in_file_ok(Changes =>
"placeholder date/time" => qr(Date/time)
);
module_boilerplate_ok('lib/Apache/Session/libmemcached.pm');
module_boilerplate_ok('lib/Apache/Session/Store/libmemcached.pm');
view all matches for this distribution
view release on metacpan or search on metacpan
SimpleTemplate.pm view on Meta::CPAN
=head2 template "example.stml"
<%!
my $foo = 'working!';
sub not_installed_properly { return $foo;}
%>
<html>
<body bgcolor="ffffff">
<h2>Apache::SimpleTemplate seems to be <%= ¬_installed_properly(); %> </h2>
</body>
</html>
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/More.pm view on Meta::CPAN
{
$tb->_unoverload_str( \$e1, \$e2 );
# Either they're both references or both not.
my $same_ref = !( !ref $e1 xor !ref $e2 );
my $not_ref = ( !ref $e1 and !ref $e2 );
if( defined $e1 xor defined $e2 ) {
$ok = 0;
}
elsif( !defined $e1 and !defined $e2 ) {
inc/Test/More.pm view on Meta::CPAN
$ok = 0;
}
elsif( $same_ref and( $e1 eq $e2 ) ) {
$ok = 1;
}
elsif($not_ref) {
push @Data_Stack, { type => '', vals => [ $e1, $e2 ] };
$ok = 0;
}
else {
if( $Refs_Seen{$e1} ) {
view all matches for this distribution
view release on metacpan or search on metacpan
t/External/Apache-Sling-Authz.t view on Meta::CPAN
# Run tests:
ok( $content->add( $test_content1, \@test_properties ),
"Content Test: Content \"$test_content1\" added successfully." );
ok ( ! $authz->get_acl( 'bad_content_does_not_exist' ), 'Check get_acl function with bad content location' );
ok( $authz->get_acl( $test_content1 ),
"Authz Test: Content \"$test_content1\" ACL fetched successfully." );
my @grant_privileges;
t/External/Apache-Sling-Authz.t view on Meta::CPAN
"User Test: User \"$test_user\" added successfully." );
ok( $authz->modify_privileges( $test_content1, $test_user, \@grant_privileges, \@deny_privileges ),
"Authz Test: Content \"$test_content1\" ACL privileges successfully modified." );
ok( ! $authz->modify_privileges( 'bad_content_does_not_exist', $test_user, \@grant_privileges, \@deny_privileges ),
"Authz Test: Content \"bad_content_does_not_exist\" ACL privileges not modified." );
push @grant_privileges, 'read';
ok( $authz->modify_privileges( $test_content1, $test_user, \@grant_privileges, \@deny_privileges ),
"Authz Test: Content \"$test_content1\" ACL privileges successfully modified." );
ok( ! $authz->del( 'bad_content_does_not_exist', $test_user ),
"Authz Test: Content \"bad_content_does_not_exist\" ACL privileges not removed for principal: \"$test_user\"." );
ok( $authz->del( $test_content1, $test_user ),
"Authz Test: Content \"$test_content1\" ACL privileges successfully removed for principal: \"$test_user\"." );
# Authz:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Test.pm view on Meta::CPAN
}
die "bogus module name $_" unless /^[\w:.]+$/;
# if the module was explicitly passed with a .c extension,
# do not try to eval it as a Perl module
my $not_found = 1;
unless (/\.c$/) {
eval "require $_";
$not_found = 0 unless $@;
#print $@ if $@;
}
push @reasons, "cannot find module '$_'" if $not_found;
}
if (@reasons) {
push @SkipReasons, @reasons;
return 0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Voodoo/MP/V1.pm view on Meta::CPAN
sub declined { return Apache::Constants::DECLINED; }
sub forbidden { return Apache::Constants::FORBIDDEN; }
sub ok { return Apache::Constants::OK; }
sub server_error { return Apache::Constants::SERVER_ERROR; }
sub not_found { return Apache::Constants::NOT_FOUND; }
sub content_type { shift()->{'r'}->send_http_header(@_); }
sub err_header_out { shift()->{'r'}->err_header_out(@_); }
sub header_in { shift()->{'r'}->header_in(@_); }
sub header_out { shift()->{'r'}->header_out(@_); }
view all matches for this distribution
view release on metacpan or search on metacpan
sub _init{
my ($dbl, $init) = @_;
#NOTE: Because DBL is tested here for DBL compatibility, it does not need to be tested again anywhere else
#in a Wyrd. If it is defined, it is a DBL.
my $not_hash = (ref($init) ne 'HASH');
if (ref($dbl) and UNIVERSAL::can($dbl, 'verify_dbl_compatibility')) {
$_dbl = $dbl;
$dbl->log_bug("ERROR: Invalid data (non-hashref) apparently given to object as Initial Value -- Ignoring")
if ($not_hash);
}
$init = {} if ($not_hash);
foreach my $level (values %_loglevel) {
$_error_handler{$level} = $_disabled_error_handler;
}
#must test for existence, since a loglevel can be 0 and, therefore, false
$init->{'loglevel'} = ($dbl->loglevel || 1) unless (exists($init->{'loglevel'}));
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/XPointer.pm view on Meta::CPAN
}
}
if (! $accept) {
$apache->log()->error("unable to send request as '$accept'");
return $pkg->_not_acceptable();
}
}
#
lib/Apache/XPointer.pm view on Meta::CPAN
sub _server_error {
my $pkg = shift;
return ($pkg->_mp2()) ? Apache::HTTP_INTERNAL_SERVER_ERROR() : Apache::Constants::SERVER_ERROR();
}
sub _not_found {
my $pkg = shift;
return ($pkg->_mp2()) ? Apache::HTTP_NOT_FOUND() : Apache::Constants::NOT_FOUND();
}
sub _not_acceptable {
my $pkg = shift;
return ($pkg->_mp2()) ? Apache::HTTP_NOT_ACCEPTABLE() : Apache::Constants::HTTP_NOT_ACCEPTABLE();
}
sub _partial_content {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/API.pm view on Meta::CPAN
# rfc9457 standard for REST API error response: <https://www.rfc-editor.org/rfc/rfc9457.html>
# Legacy JSON payload like Google, Twitter, Facebook
# Modern REST APIs now uses rfc9457 with a flattened payload.
# When the use_rfc_error object property is true, we use rfc9457 flattened error, this will produce something like:
# {
# error => 'not_found',
# status => 404,
# title => 'Not found!',
# detail => q{The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.},
# locale => 'en-US',
# type => 'https://api.example.com/problems/not-found',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AMF51DegreesFilter.pm view on Meta::CPAN
}
#
# Define the cache system directory
#
my $cacheSystem = new Cache::FileBackend( $cachedirectorystore, 3, 000 );
$cacheSystem->store( '51Degrees-id', 'device_not_found', "id=device_not_found&device=false&device_claims_web_support=true&is_wireless_device=false");
if ($cacheSystem->restore('51Degrees-conf','ver')) {
} else {
$CommonLib->printLog('Create new wurf-con store');
$cacheSystem->store('51Degrees-conf', 'ver', 'null');
$cacheSystem->store('51Degrees-conf', 'caplist', 'null');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCookieDBI.pm view on Meta::CPAN
my $encrypted_key = $cipher->encrypt_hex($session_key);
return $encrypted_key;
}
#-------------------------------------------------------------------------------
# _log_not_set -- Log that a particular authentication variable was not set.
sub _log_not_set {
my ( $class, $r, $variable ) = @_;
my $auth_name = $r->auth_name;
my $message = "${class}\t$variable not set for auth realm $auth_name";
$class->logger( $r, Apache2::Const::LOG_ERR, $message, undef,
LOG_TYPE_SYSTEM, $r->uri );
lib/Apache2/AuthCookieDBI.pm view on Meta::CPAN
$c{$variable}
= defined $value_from_config
? $value_from_config
: $CONFIG_DEFAULT{$variable};
if ( !defined $c{$variable} ) {
$class->_log_not_set( $r, $variable );
}
}
# If we used encryption we need to pull in Crypt::CBC.
if ( $c{'DBI_EncryptionType'} ne 'none' ) {
lib/Apache2/AuthCookieDBI.pm view on Meta::CPAN
# _percent_encode -- Percent-encode (like URI encoding) any non-alphanumberics
# in the supplied string.
sub _percent_encode {
my ($str) = @_;
my $not_a_word = qr/ ( \W ) /x;
$str =~ s/$not_a_word/ uc sprintf '%%%02x', ord $1 /xmeg;
return $str;
}
#-------------------------------------------------------------------------------
# _percent_decode -- Percent-decode (like URI decoding) any %XX sequences in
view all matches for this distribution