view release on metacpan or search on metacpan
ImageMagick.pm view on Meta::CPAN
Such a script can modify all parameters or make operations on the image.
There are two possible sorts of scripts. A per image script, the name is build
by appending the extension given by C<AIMScriptExt> to the filename and searched
in the directory given by C<AIMScriptDir>. So if C<AIMScriptDir> is set to
F</usr/images/scripts> and a request for F<whatever.gif> comes in, Apache::ImageMagick
looks for a script named F</usr/images/scripts/whatever.gif.pl>. If the script is
found it is loaded into memory, compiled and executed. If the script is already in
memory, Apache::ImageMagick checks if the scripts is modified and if not it is only
executed, so the Perl code has to be compiled only when the script changes.
If C<AIMScriptDir> is not set, Apache::ImageMagick doesn't search for a per image
script. There is a second sort of script the default one. The full path of this script
ImageMagick.pm view on Meta::CPAN
Directory for creating cached image files. Default: Directory of requested image.
=item AIMSourceDir
Directory in which Apache::ImageMagick looks for the source image files.
Default: Directory of requested image.
=item AIMStripPrefix
ImageMagick.pm view on Meta::CPAN
This is prefix is stripped from the filename, before it is append to AIMSourceDir.
It's actually a Perl regex.
=item AIMScriptDir
Directory in which Apache::ImageMagick looks for a script that should be executed
to modfiy the parameters before conversion. The name of the script is build
by removing the AIMStripPrefix from the filename, append the result to AIMScriptDir
and appending the extension given with AIMScriptExt. If no AIMStripPrefix is given
the basename of the image is taken, the AIMScriptExt appended and searched in the
AIMScriptDir. The special value '.' means the same directory as the source image
view all matches for this distribution
view release on metacpan or search on metacpan
listkids|||
list|||
load_module_nocontext|||vn
load_module||5.006000|v
localize|||
looks_like_number|||
lop|||
mPUSHi|5.009002||p
mPUSHn|5.009002||p
mPUSHp|5.009002||p
mPUSHu|5.009002||p
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/LangPrefCookie.pm view on Meta::CPAN
</Location>
=head1 DESCRIPTION
This module looks for a cookie providing a language-code as its value.
This preference is then implanted into httpd's representation of the
C<Accept-Language> header, just as if the client had asked for it as #1
choice. The original preferences are still present, albeit with lowered
q-values. The cookie's name is configurable, as described in the
examples. Setting/modifying/deleting such a cookie is to be handled
view all matches for this distribution
view release on metacpan or search on metacpan
Language/DBI.pm view on Meta::CPAN
LanguageHandler Apache::Language::DBI
</Location>
=head1 DESCRIPTION
This LanguageHandler implements a per-location DBI dictionnary. It looks-up a given
table for a matching language/key pair and returns the best possible match.
The configurable directives are pretty self-explanatory.
=head1 TODO
view all matches for this distribution
view release on metacpan or search on metacpan
SQL_CURSOR_DYNAMIC
SQL_CURSOR_STATIC
SQL_CURSOR_TYPE_DEFAULT
) ], # for ODBC cursor types
utils => [ qw(
neat neat_list $neat_maxlen dump_results looks_like_number
data_string_diff data_string_desc data_diff
) ],
profile => [ qw(
dbi_profile dbi_profile_merge dbi_time
) ], # notionally "in" DBI::Profile and normally imported from there
my ($h, $spec) = @_;
my $level = 0;
my $flags = 0;
my @unknown;
for my $word (split /\s*[|&,]\s*/, $spec) {
if (DBI::looks_like_number($word) && $word <= 0xF && $word >= 0) {
$level = $word;
} elsif ($word eq 'ALL') {
$flags = 0x7FFFFFFF; # XXX last bit causes negative headaches
last;
} elsif (my $flag = $h->parse_trace_flag($word)) {
return $sth->set_err(1, "Value for parameter $p_id must be a scalar or an arrayref, not a ".ref($value_array))
if defined $value_array and ref $value_array and ref $value_array ne 'ARRAY';
return $sth->set_err(1, "Can't use named placeholder '$p_id' for non-driver supported bind_param_array")
unless DBI::looks_like_number($p_id); # because we rely on execute(@ary) here
return $sth->set_err(1, "Placeholder '$p_id' is out of range")
if $p_id <= 0; # can't easily/reliably test for too big
# get/create arrayref to hold params
my @key_fields = (ref $key_field) ? @$key_field : ($key_field);
my @key_indexes;
my $num_of_fields = $sth->FETCH('NUM_OF_FIELDS');
foreach (@key_fields) {
my $index = $names_hash->{$_}; # perl index not column
$index = $_ - 1 if !defined $index && DBI::looks_like_number($_) && $_>=1 && $_ <= $num_of_fields;
return $sth->set_err(1, "Field '$_' does not exist (not one of @{[keys %$names_hash]})")
unless defined $index;
push @key_indexes, $index;
}
my $rows = {};
Calls C<neat> on each element of the list and returns a string
containing the results joined with C<$field_sep>. C<$field_sep> defaults
to C<", ">.
=item C<looks_like_number>
@bool = looks_like_number(@array);
Returns true for each element that looks like a number.
Returns false for each element that does not look like a number.
Returns C<undef> for each element that is undefined or empty.
=item C<hash>
calling the method, and checking for errors to trigger RaiseError
etc. on return. This differs from the default behaviour of func().
Note for driver authors: The DBD::Foo::xx->install_method call won't
work until the class-hierarchy has been setup. Normally the DBI
looks after that just after the driver is loaded. This means
install_method() can't be called at the time the driver is loaded
unless the class-hierarchy is set up first. The way to do that is
to call the setup_driver() method:
DBI->setup_driver('DBD::Foo');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
if ( ! $self->is_interactive() ) {
$log->audit( "not running interactively, can not prompt!");
return $default;
}
return $log->error( "ask called with \'$question\' which looks unsafe." )
if $question !~ m{\A \p{Any}* \z}xms;
my $response;
return $p{test_ok} if defined $p{test_ok};
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
next if ! -e $tarball;
$log->audit( " sources_get: testing $tarball ");
if (`$filet $tarball | $grep zip`) {
$log->audit( " sources_get: looks good!");
return 1;
};
$log->audit( " oops, is not [b|g]zipped data!");
$self->file_delete( $tarball, %args);
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
# Returns : 0 - failure, 1 - success
# Parameters :
# Optional : I - auto - no prompts, just fix everything
# See Also : sysadmin
Comments: Auto mode should be run with great caution. Run it first to see the results and then, if everything looks good, run in auto mode to do the actual repairs.
=item chown_system
The advantage this sub has over a Pure Perl implementation is that it can utilize sudo to gain elevated permissions that we might not otherwise have.
view all matches for this distribution
view release on metacpan or search on metacpan
MIMEMapper.pm view on Meta::CPAN
sub AddHandler ($$@;@) {
my ($cfg, $parms, $handler, $type) = @_;
# Intercept the directive if the handler looks like a PerlHandler.
# This is not an ideal check, but sufficient for the moment.
if ($handler =~ m/::/) {
push @{$cfg->{$type}}, $handler;
return OK;
}
MIMEMapper.pm view on Meta::CPAN
directives, all files inside of /perl-bin are processed using
Apache::Registry.
=head1 NOTES
The current logic checks AddHandler for something that looks like
a Perl module, so
AddHandler server-parsed .shtml
still works. The criterion for deciding if Apache::MIMEMapper
view all matches for this distribution
view release on metacpan or search on metacpan
this module.
DefaultSkin is the filename of the skin to be used if no skin is explicity
requested in the url a browser requests. Set this to default.tmpl to start.
default.tmpl comes with Apache::MP3::Skin and should have been one of the files
copied in step 3. Apache::MP3::Skin first looks for this file in the directory
that the browser is viewing, and if it doesn't find it there looks in BaseDir
which is defaulted to be /apache_mp3.
HomePath should be set to the logical root of your songs directory
structure, if you don't want that to be your document root. HomePath
is most commonly used when building breadcrumb trails, and in most cases
view all matches for this distribution
view release on metacpan or search on metacpan
#utility subroutine for configuration
sub get_dir {
my $self = shift;
my ($config,$default) = @_;
my $dir = $self->r->dir_config($config) || $default;
return $dir if $dir =~ m!^/!; # looks like a path
return $dir if $dir =~ m!^\w+://!; # looks like a URL
return $self->default_dir . '/' . $dir;
}
# return true if downloads are allowed from this directory
sub download_ok {
view all matches for this distribution
view release on metacpan or search on metacpan
MiniWiki.pm view on Meta::CPAN
If you don't install a template, a default one will be used.
The C<datadir> variable defines where in the filesystem that the RCS
files that MiniWiki uses should be stored. This is also where MiniWiki
looks for a template to use.
The C<vroot> should match the virtual directory that MiniWiki runs under.
If this variable is set, it should point to a standard htpasswd file
which MiniWiki has write access to. The function to change a users password
view all matches for this distribution
view release on metacpan or search on metacpan
docsrc/features.xml view on Meta::CPAN
configuration options.
</para>
<para>
To create a new view, create a <filename>View/<replaceable>pkit_view</replaceable></filename> directory and place the PageKit Templates and XSLT files for
the pages and components that you wish to apply the view to. Note that if
PageKit doesn't find a template or XSLT file in the <filename>View/<replaceable>pkit_view</replaceable></filename> directory it looks in the
<filename>View/Default</filename> directory. That is, the files <filename>View/<replaceable>pkit_view</replaceable></filename> "override" the files
in <filename>View/Default</filename> directory.
</para>
<para>
To association a media output such as XML, WML, or PDF with a view, use
view all matches for this distribution
view release on metacpan or search on metacpan
ProxyConf.pm view on Meta::CPAN
For secure HTTP traffic special rules apply. Because this traffic is not
cached all clients connect to proxy A1 and A2 directly spreading the load
equally.
This is how the proxyconf.ini looks:
[proxy]
172.16.0.0/20=(172.16.0.10:3128,172.16.0.20:3128)
172.16.16.0/20=172.16.16.10:3128,172.16.0.20:3128
172.16.32.0/20=172.16.32.10:3128,172.16.16.10:3128
view all matches for this distribution
view release on metacpan or search on metacpan
ProxyPass.pm view on Meta::CPAN
<Location /foo>
SetHandler perl-script
PerlHandler Apache::ProxyPass
</Location>
#proxy.conf looks like
/foo/apache http://www.apache.org
/foo/perl http://www.perl.com
view all matches for this distribution
view release on metacpan or search on metacpan
RandomLocation.pm view on Meta::CPAN
$site = $all_sites[rand(@all_sites)]
}
return $site;
}
# looks up the host name, if the ip address is given
sub host_name {
my ($addr) = @_;
my @b;
if (@b = ($addr =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/)) {
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
}
}
die "Can't find mod_perl installed\nThe error was: $@" if $@;
}
# the function looks at %ENV and Makefile.PL option to figure out
# whether a specific mod_perl generation was requested.
# It uses the following logic:
# via options:
# perl Makefile.PL MOD_PERL=2
# or via %ENV:
view all matches for this distribution
view release on metacpan or search on metacpan
RequestNotes.pm view on Meta::CPAN
my $status = $apr->parse;
if ($status) {
# I don't know what to do here, but rather than return
# SERVER_ERROR, do something that says there was a parse failure.
# GET data is still available, but POST looks hosed...
# problems with uploads are caught here as well.
$Apache::RequestNotes::err = $status;
$log->error("Apache::RequestNotes encountered a parsing error!");
view all matches for this distribution
view release on metacpan or search on metacpan
----------------------------
revision 1.3
date: 1999/11/05 20:10:28; author: khhaga01; state: Exp; lines: +32 -2
Fixed some of the meta refresh pages. I now see that
tag and rewrite the URL properly. Cookies are still a
major problem. It looks like I may have to build some
sort of cookie database and give the client a cookie poining
to his/her entry in that database. Looks like the safest way to go.
----------------------------
revision 1.2
date: 1999/11/04 20:34:39; author: khhaga01; state: Exp; lines: +5 -0
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SSI.pm view on Meta::CPAN
This movie is by the Coen Brothers.
<!--#else-->
This movie is not by the Coen Brothers.
<!--#endif-->
It can't handle very sophistocated Perl though, because it manually looks for
variables (of the form $var or ${var}, just like C<mod_include>), and will get tripped
up on expressions like $object->method or $hash{'key'}. I'll welcome any suggestions
for how to allow arbitrary Perl expressions while still filling in Apache variables.
=back
lib/Apache/SSI.pm view on Meta::CPAN
STDOUT. Thus Apache::Filter can't catch it and filter it.
If Apache::SSI is the last filter in the chain, or if you stick to simpler SSI
directives like <!--#fsize-->, <!--#flastmod-->, etc. you'll be fine.
* Currently, the way <!--#echo var=whatever--> looks for variables is
to first try $r->subprocess_env, then try %ENV, then the five extra environment
variables mod_include supplies. Is this the correct order?
=head1 TO DO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
=head2 build_x12
my %hash = $s->build_x12($doctype,\%vendor,\%data);
This function looks for a perl parser file for the specific vendor
for the specific $doctype (850, 855, 856, 810, etc) and returns
a hash which can then be fed into format_x12.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
SearchEngineLog.pm view on Meta::CPAN
{
$l->debug ("Apache::SearchEngineLog: No parameters present..");
return 1;
}
# referer looks fairly usefull.. let's check this..
my %params; # i know some people don't like this.. I do ;)
foreach (split (m#\&#, $params))
{
my ($key, $value) = split (m#=#, $_, 2);
$value =~ y#+# #;
view all matches for this distribution
view release on metacpan or search on metacpan
unless ($uri = $resp->{uri}) { return SERVER_ERROR; }
$r->header_out(Location => $uri);
return REDIRECT;
}
## every looks good, set uid and issue new credentials
$r->user($uid);
$resp = $self->issueCredentials($r);
unless (ref($resp)) { $log->error($resp); return SERVER_ERROR; }
if ($msg = $resp->{message}) { $log->info($msg); }
unless ($resp->{uri}) { return SERVER_ERROR; }
view all matches for this distribution
view release on metacpan or search on metacpan
test 'session creation' => sub {
ok Apache::Session::Generate::UUID::generate($session), 'generate called ok';
ok exists $session->{'data'}->{'_session_id'}, 'session id created';
is keys %{ $session->{'data'} } , 1, 'just one key in the data hashref';
like $session->{'data'}->{'_session_id'}, qr/^[0-9a-fA-F\-]{36}$/, 'id looks like a uuid';
$id = $session->{'data'}->{'_session_id'};
};
test 'session uniqueness' => sub {
Apache::Session::Generate::UUID::generate($session);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Wrapper.pm view on Meta::CPAN
C<Apache::Cookie> for cookie-handling. Otherwise it uses
C<CGI::Cookie> as a fallback.
If it ends up using C<CGI::Cookie> then you must provide a
"header_object" parameter. This object must have an
C<err_headers_out()> or C<headers_out()> method. It looks for these
methods in that order. The method is expected to return an object with
an API like C<Apache::Table>. It calls C<add()> on the returned method
to add a "Set-Cookie" header.
=head1 REGISTERING CLASSES
view all matches for this distribution
view release on metacpan or search on metacpan
t/99md5gen.t view on Meta::CPAN
ok exists($session->{data}->{_session_id}), 'session id created';
ok keys(%{$session->{data}}) == 1, 'just one key in the data hashref';
like $session->{data}->{_session_id}, qr/^[0-9a-fA-F]{32}$/, 'id looks like hex';
my $old_id = $session->{data}->{_session_id};
Apache::Session::Generate::MD5::generate($session);
view all matches for this distribution
view release on metacpan or search on metacpan
SetWWWTheme.pm view on Meta::CPAN
local $/ = undef; # Read in the whole schmear at once.
while (<$fh>) # I suppose this while isn't necessary.
{
# this block looks through the HTML to find our comment block that contains directives
# for controlling the "Look and Feel" of the pages.
(/\@NAVBAR\s*=\s*(.*?[^\\]);/) && ($usenavbar = $1);
(/\@TOPBAR\s*=\s*(.*?[^\\]);/) && ($topbar = $1);
(/\@BOTTOMBAR\s*=\s*(.*?[^\\]);/) && ($bottombar = $1);
SetWWWTheme.pm view on Meta::CPAN
sub MakeBody
{
# First, we have to clean up the variables. Since we've started escaping out
# semicolons, we'll have to replace everything that looks like \; with ;
$BGCOLOR =~ s/\\;/;/g;
$bgpicture =~ s/\\;/;/g;
$alink =~ s/\\;/;/g;
$link =~ s/\\;/;/g;
SetWWWTheme.pm view on Meta::CPAN
@LINK=#FFFFFF;
=item @LOCALCONFIGFILE
Valid only in server configuration. This directive tells the module what
file to look for when it looks for local configuration files. The default is
LookAndFeelConfig. It may be set to any valid filename.
@LOCALCONFIGFILE=LOOKANDFEEL;
=item @MORELINKSTITLE
view all matches for this distribution
view release on metacpan or search on metacpan
SimpleTemplate.pm view on Meta::CPAN
'<%+ %>' is the same as '<%= %>', but the output gets url-encoded.
(mnemonic: '+' is a space in a url-encoded string.)
'<%^ %>'is the same as '<%= %>', but the output gets html-escaped.
(mnemonic: '^' looks like the '<' and '>' that get replaced.)
'<%\ %>'is the same as '<%= %>', except the string gets escaped for
use as a single-quoted javascript var. ("'", "\", NL, CR get escaped.)
=head3 <%- _a_comment_ %>
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SiteControl.pm view on Meta::CPAN
=head2 PERMISSION MANAGER
Each site will have a permission manager. There is usually no need for you
to subclass Apache::SiteControl::PermissionManager, but you do need to create one
and populate it with your access rules. You do this by creating a
factory class, which looks something like this:
package samples::site::MyPermissionFactory;
use Apache::SiteControl::PermissionManager;
use Apache::SiteControl::GrantAllRule;
lib/Apache/SiteControl.pm view on Meta::CPAN
if($referee->can($userA, "beat up", $userB)) { ... }
In terms of English, we would describe the rule "If A is taller than B, then
we say that A can beat up B. If A is less skilled than B, then we say that
A cannot beat up B". The rule looks like this:
package samples::FightRules;
use strict;
use warnings;
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
}
}
die "Can't find mod_perl installed\nThe error was: $@" if $@;
}
# the function looks at %ENV and Makefile.PL option to figure out
# whether a specific mod_perl generation was requested.
# It uses the following logic:
# via options:
# perl Makefile.PL MOD_PERL=2
# or via %ENV:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Sling/Print.pm view on Meta::CPAN
threads or forks from stepping on each others toes when printing to stdout.
=head2 print_result
Takes an object (user, group, site, etc) and prints out it's Message value,
appending a new line. Also looks at the verbosity level and if greater than or
equal to 1 will print extra information extracted from the object's Response
object. At the moment, won't print if log is defined, as the prints to log
happen elsewhere. TODO tidy that up.
=head2 date_time
view all matches for this distribution