Manual Pages for UNIX Darwin command on man Apache2::Util
MyWebUniversity

Manual Pages for UNIX Darwin command on man Apache2::Util

apachemodappearclh-e10m1o.d1~p2Ue:sr:elmr-o1dC0o1pn.et1rr~li2-b:2u:.tm0eo.dd2:Pp:eedrrollc-sD2:o.:c0au.pm2ie::n::tdAaoptcaisco:hn:ea2p:i::U:tAipla(c3h)e2::Util(3)

NAME

Apache2::Util - Perl API for Misc Apache Utility functions

SSyynnooppssiiss

use Apache2::Util ();

# OS escape path

$escapedpath = Apache2::Util::escapepath($path, "a 'long' file.html");

# format time as a string

my $fmt = "%a, %D %H:%M:%S %Z";

$fmtdate = Apache2::Util::httime($r->pool, $r->requesttime, $fmt, 0);

DDeessccrriippttiioonn Various Apache utilities that don't fit into any other group. FFuunnccttiioonnss AAPPII

"Apache2::Util" provides the following functions and/or methods:

""eessccaappeeppaatthh"" convert an OS path to a URL in an OS dependant way.

$escapedpath = Apache2::Util::escapepath($path, $p);

$escapedpath = Apache2::Util::escapepath($path, $p, $partial);

arg1: $path ( string )

The path to convert

arg2: $p ( "APR::Pool" )

The pool to allocate from

opt arg3: $partial ( boolean )

if TRUE, assume that the path will be appended to something with a '/' in it (and thus does not prefix "./")

if FALSE it prepends "./" unless $path contains ":" optionally

followed by "/". the default is TRUE

ret: $escapedpath ( string )

The escaped path since: 2.0.00 ""hhttttiimmee"" Convert time from an integer value into a string in a specified format

$timestr = Apache2::Util::httime($p);

$timestr = Apache2::Util::httime($p, $time);

$timestr = Apache2::Util::httime($p, $time, $fmt);

$timestr = Apache2::Util::httime($p, $time, $fmt, $gmt);

arg1: $p ( "APR::Pool object" )

The pool to allocate memory from

opt arg2: $time ( number )

The time to convert (e.g., "time()" or "$r->requesttime").

If the value is not passed the current time will be used.

opt arg3: $fmt ( string )

The format to use for the conversion, using strftime(3) tokens. If the value is not passed the default format used is:

"%a, %d %b %Y %H:%M:%S %Z"

opt arg4: $gmt ( boolean )

The time will be not converted to GMT if FALSE is passed. If the value is not passed TRUE (do convert) is used as a default.

ret: $timestr (string)

The string that represents the specified time since: 2.0.00 Examples: Use current time, the default format and convert to GMT:

$fmtdate = Apache2::Util::httime($r->pool);

Use my time, the default format and convert to GMT:

my $time = time+100;

$fmtdate = Apache2::Util::httime($r->pool, $time);

Use the time the request has started, custom format and don't convert to GMT:

my $fmt = "%a, %D %H:%M:%S %Z";

$fmtdate = Apache2::Util::httime($r->pool, $r->requesttime, $fmt, 0);

SSeeee AAllssoo modperl 2.0 documentation. CCooppyyrriigghhtt modperl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. AAuutthhoorrss The modperl development team and numerous contributors.

perl v5.8.8apachemodperl-101.1~2:2:0m0o5d-1p0e-r2l0-2.0.2::docs::api::Apache2::Util(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™