PAB3
view release on metacpan or search on metacpan
lib/PAB3/CGI.pm view on Meta::CPAN
. '|' . ( $GLOBAL::STATUS || ( $GLOBAL::MPREQ ? $GLOBAL::MPREQ->status : 200 ) )
);
}
undef $GLOBAL::MPREQ;
}
sub cleanup_register {
push @CleanupHandler, [ @_ ];
}
sub setenv {
if( $ENV{'SCRIPT_FILENAME'}
&& $ENV{'SCRIPT_FILENAME'} =~ /^(.+[\\\/])(.+?)$/
) {
$ENV{'SCRIPT_PATH'} = $1;
$ENV{'SCRIPT'} = $2;
}
elsif( $0 =~ /^(.+[\\\/])(.+?)$/ ) {
$ENV{'SCRIPT_PATH'} = $1;
$ENV{'SCRIPT'} = $2;
}
lib/PAB3/CGI.pm view on Meta::CPAN
=head1 NAME
PAB3::CGI - CGI module for the PAB3 environment or as standalone
=head1 SYNOPSIS
# load module and export default functions and variables
use PAB3::CGI qw(:default);
# set some useful variables to the environment
PAB3::CGI::setenv();
# parse request and cookies and start the cgi output handler
PAB3::CGI::init();
if( $_REQUEST{'cmd'} eq 'showenv' ) {
print_var( \%ENV );
}
elsif( $_REQUEST{'cmd'} eq 'redirect' ) {
return redirect( 'http://myserver.com/' );
}
lib/PAB3/CGI.pm view on Meta::CPAN
Win32
save_to_file => if TRUE, save uploaded files to disk
if FALSE, hold uploaded files in memory
default is TRUE
Example:
PAB3::CGI::init();
=item setenv ()
Set some useful variables to the interpreters environment
these variables are:
$ENV{'SCRIPT_PATH'} : path to the main script
$ENV{'SCRIPT'} : name of the main script
$ENV{'REMOTE_OS'} : name of the remote operating system
lib/PAB3/ModPerl/Registry.pm view on Meta::CPAN
my $class = ( @_ >= 2 ) ? shift : __PACKAGE__;
my $r = shift;
if( ! $PAB3::Statistic::VERSION &&
$r->dir_config->get( 'UseStatistic' )
) {
require PAB3::Statistic;
}
# set additional variables to the environment
&PAB3::CGI::setenv();
# parse request and cookies
&PAB3::CGI::init();
$ENV{'GATEWAY_INTERFACE'} = 'CGI-ModPerl-PAB3';
my $filename = $r->filename();
my $package = $r->dir_config->get( 'Package' );
if( ! $package ) {
xs/PAB3/PAB3.pm view on Meta::CPAN
}
if( $_ eq ':default' ) {
*{$callpkg . '::print_var'} = \&{$pkg . '::print_var'};
*{$callpkg . '::print_r'} = \&{$pkg . '::print_var'};
*{$callpkg . '::require'} = \&{$pkg . '::require'};
*{$callpkg . '::require_and_run'} = \&{$pkg . '::require_and_run'};
}
}
}
sub setenv {
if( $0 =~ /^(.+\/)(.+?)$/ ) {
$ENV{'SCRIPT_PATH'} = $1;
$ENV{'SCRIPT'} = $2;
}
else {
$ENV{'SCRIPT_PATH'} = '';
$ENV{'SCRIPT'} = $0;
}
}
xs/PAB3/PAB3.pm view on Meta::CPAN
# or - with internal function
<* &PAB3::print_r( \%ENV ) *>
=head1 METHODS
=over
=item setenv ()
Set some useful variables to the interpreters environment
these variables are:
$ENV{'SCRIPT_PATH'} : path to the main script
$ENV{'SCRIPT'} : name of the main script
=item new ( [%arg] )
xs/ppport.h view on Meta::CPAN
magic_regdatum_get|||
magic_regdatum_set|||
magic_scalarpack|||
magic_set_all_env|||
magic_setamagic|||
magic_setarylen|||
magic_setbm|||
magic_setcollxfrm|||
magic_setdbline|||
magic_setdefelem|||
magic_setenv|||
magic_setfm|||
magic_setglob|||
magic_setisa|||
magic_setmglob|||
magic_setnkeys|||
magic_setpack|||
magic_setpos|||
magic_setregexp|||
magic_setsig|||
magic_setsubstr|||
xs/ppport.h view on Meta::CPAN
my_letohi|||n
my_letohl|||n
my_letohs|||n
my_lstat|||
my_memcmp||5.004000|n
my_memset|||n
my_ntohl|||
my_pclose||5.004000|
my_popen_list||5.007001|
my_popen||5.004000|
my_setenv|||
my_socketpair||5.007003|n
my_stat|||
my_strftime||5.007002|
my_swabn|||n
my_swap|||
my_unexec|||
my|||
newANONATTRSUB||5.006000|
newANONHASH|||
newANONLIST|||
xs/ppport.h view on Meta::CPAN
scan_word|||
scope|||
screaminstr||5.005000|
seed|||
set_context||5.006000|n
set_csh|||
set_numeric_local||5.006000|
set_numeric_radix||5.006000|
set_numeric_standard||5.006000|
setdefout|||
setenv_getix|||
share_hek_flags|||
share_hek|||
si_dup|||
sighandler|||n
simplify_sort|||
skipspace|||
sortsv||5.007003|
ss_dup|||
stack_grow|||
start_glob|||
( run in 0.834 second using v1.01-cache-2.11-cpan-6aa56a78535 )