Apache2-SSI
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
my $f = File::Spec->catfile( $base, 'apache2.conf' );
my $old = File::Spec->catfile( $base, 'httpd.conf' );
my $env = File::Spec->catfile( $base, 'envvars' );
if( -e( $f ) && -r( $f ) )
{
print( STDERR "Foud an Apache configuration at '$f'\n" ) if( $MY_DEBUG );
if( -e( $env ) && -r( $env ) && ( $^O eq 'darwin' || $^O eq 'linux' ) )
{
print( STDERR "Found an Apache environment variables setup at '$env'\n" ) if( $MY_DEBUG );
my $fh;
## Credits: <https://stackoverflow.com/a/3836009/4814971>
if( defined( $fh = IO::File->new( "sh -x $env 2>&1 1>/dev/null|" ) ) )
{
my $vars = {};
while( defined( $_ = $fh->getline ) )
{
chomp;
if( /^[[:blank:]\h]*\+[[:blank:]\h]+(?:export[[:blank:]\h]+)?(\w+)\=(.*?)$/ )
{
next unless( substr( $1, 0, 7 ) eq 'APACHE_' );
$vars->{ $1 } = $ref->{ "_$1" } = $2;
Expressions that would not work outside of Apache, i.e. it will return
an empty string:
<!--#expr="%{HTTP:X-example-header} in { 'foo', 'bar', 'baz' }" -->
See Apache documentation <http://httpd.apache.org/docs/2.4/en/expr.html>
for more information.
CREDITS
Credits to Ken Williams for his implementation of Apache::SSI from which
I borrowed some code.
AUTHOR
Jacques Deguest <jack@deguest.jp>
CPAN ID: jdeguest
<https://gitlab.com/jackdeguest/Apache2-SSI>
SEE ALSO
<!--#expr="%{HTTP:X-example-header} in { 'foo', 'bar', 'baz' }" -->
See [Apache
documentation](http://httpd.apache.org/docs/2.4/en/expr.html){.perl-module}
for more information.
CREDITS
=======
Credits to Ken Williams for his implementation of
[Apache::SSI](https://metacpan.org/pod/Apache::SSI){.perl-module} from
which I borrowed some code.
AUTHOR
======
Jacques Deguest \<`jack@deguest.jp`{classes="ARRAY(0x564839326528)"}\>
CPAN ID: jdeguest
lib/Apache2/SSI.pm view on Meta::CPAN
return( $_[1] );
}
sub _time_args
{
# This routine must respect the caller's wantarray() context.
my( $self, $time, $zone ) = @_;
return( ( $zone && $zone =~ /GMT/ ) ? gmtime( $time ) : localtime( $time ) );
}
# Credits: Torsten Förtsch
{
# NOTE: Apache2::SSI::Filter class
package
Apache2::SSI::Filter;
if( exists( $ENV{MOD_PERL} ) &&
$ENV{MOD_PERL} =~ /^mod_perl\/(\d+\.[\d\.]+)/ )
{
require Apache2::Filter;
require Apache2::RequestUtil;
lib/Apache2/SSI.pm view on Meta::CPAN
For subnet checks, this uses L<Net::Subnet>
Expressions that would not work outside of Apache, i.e. it will return an empty string:
<!--#expr="%{HTTP:X-example-header} in { 'foo', 'bar', 'baz' }" -->
See L<Apache documentation|http://httpd.apache.org/docs/2.4/en/expr.html> for more information.
=head1 CREDITS
Credits to Ken Williams for his implementation of L<Apache::SSI> from which I borrowed some code.
=head1 AUTHOR
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
CPAN ID: jdeguest
L<https://gitlab.com/jackdeguest/Apache2-SSI>
=head1 SEE ALSO
lib/Apache2/SSI/Common.pm view on Meta::CPAN
{
$u = URI::file->new( $new_path );
}
else
{
$u->path( $new_path );
}
return( $u );
}
# Credits: Path::Tiny
sub slurp
{
my $self = shift( @_ );
my $args = {};
no warnings 'uninitialized';
$args = Scalar::Util::reftype( $_[0] ) eq 'HASH'
? shift( @_ )
: !( scalar( @_ ) % 2 )
? { @_ }
: {};
lib/Apache2/SSI/File/Type.pm view on Meta::CPAN
=head2 with_magic
Provided with a C<magic> value, and this will attempt at guessing the mime type, and return it.
=head1 AUTHOR
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
=head1 CREDITS
Credits Nokubi Takatsugu.
=head1 SEE ALSO
L<file(1)>
L<Apache2::SSI>, L<Apache2::SSI::File>, L<Apache2::SSI::Finfo>, L<Apache2::SSI::URI>
=head1 COPYRIGHT & LICENSE
Copyright (c) 2021 DEGUEST Pte. Ltd.
lib/Apache2/SSI/SharedMem.pm view on Meta::CPAN
else
{
our $SYSV_SUPPORTED = 0;
}
our @EXPORT_OK = qw(LOCK_EX LOCK_SH LOCK_NB LOCK_UN);
our %EXPORT_TAGS = (
all => [qw( LOCK_EX LOCK_SH LOCK_NB LOCK_UN )],
lock => [qw( LOCK_EX LOCK_SH LOCK_NB LOCK_UN )],
'flock' => [qw( LOCK_EX LOCK_SH LOCK_NB LOCK_UN )],
);
# Credits IPC::Shareable
our $N = do { my $foo = eval { pack "L!", 0 }; $@ ? '' : '!' };
our $SHEM_REPO = {};
our $VERSION = 'v0.1.2';
};
use strict;
use warnings;
sub init
{
t/htdocs/index.html view on Meta::CPAN
<!-- WARNING: this file is generated, do not edit
generated on Tue Dec 29 07:40:15 2020
01: /usr/lib/x86_64-linux-gnu/perl5/5.30/Apache/TestConfig.pm:1003
02: /usr/lib/x86_64-linux-gnu/perl5/5.30/Apache/TestConfig.pm:1021
03: /usr/lib/x86_64-linux-gnu/perl5/5.30/Apache/TestConfig.pm:1371
04: /usr/lib/x86_64-linux-gnu/perl5/5.30/Apache/TestConfig.pm:1611
05: /usr/lib/x86_64-linux-gnu/perl5/5.30/Apache/TestRun.pm:502
06: /usr/lib/x86_64-linux-gnu/perl5/5.30/Apache/TestRunPerl.pm:107
07: /usr/lib/x86_64-linux-gnu/perl5/5.30/Apache/TestRun.pm:713
08: /usr/lib/x86_64-linux-gnu/perl5/5.30/Apache/TestRun.pm:713
09: /media/sf_src/perl/Apache2-SSI/t/TEST:24
( run in 0.399 second using v1.01-cache-2.11-cpan-de7293f3b23 )