Apache2::SSI::Common - Apache2 Server Side Include Common Resources
v0.1.1
use parent qw( Apache2::SSI::Common );
There is no specific api for this. This module contains only common resources used by other modules in this distribution.
Provided with an uri, and this will resolve the path and removing the dots, such as . and .. and return an URI object.
.
..
This is done as per the RFC 3986 section 5.2.4 algorithm
my $uri = $ssi->collapse_dots( '/../a/b/../c/./d.html' ); # would become /a/c/d.html my $uri = $ssi->collapse_dots( '/../a/b/../c/./d.html?foo=../bar' ); # would become /a/c/d.html?foo=../bar $uri->query # foo=../bar
It returns the content of the "filename"
it takes an hash reference of parameters:
my $content = $uri->slurp({ binmode => ':utf-8' });
It will return undef and sets an "error" in Module::Generic if there is no "filename" value set or if the file cannot be opened.
It returns the content of the file "filename" utf-8 decoded.
This is equivalent to:
my $content = $uri->slurp({ binmode => ':utf8' });
:utf8 is slightly a bit more lax than :utf-8, so it you want strict utf8, you can do:
:utf8
:utf-8
Jacques Deguest <jack@deguest.jp>
CPAN ID: jdeguest
https://gitlab.com/jackdeguest/Apache2-SSI
Apache2::SSI::File, Apache2::SSI::URI
Copyright (c) 2020-2021 DEGUEST Pte. Ltd.
You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.
To install Apache2::SSI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache2::SSI
CPAN shell
perl -MCPAN -e shell install Apache2::SSI
For more information on module installation, please visit the detailed CPAN module installation guide.