<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># 
# /*
#  * *********** WARNING **************
#  * This file generated by ModPerl::WrapXS/0.01
#  * Any changes made here will be lost
#  * ***********************************
#  * 01: lib/ModPerl/Code.pm:709
#  * 02: lib/ModPerl/WrapXS.pm:633
#  * 03: lib/ModPerl/WrapXS.pm:1182
#  * 04: Makefile.PL:427
#  * 05: Makefile.PL:329
#  * 06: Makefile.PL:58
#  */
# 


package Apache2::Util;

use strict;
use warnings FATAL =&gt; 'all';



use Apache2::XSLoader ();
our $VERSION = '2.000008';
Apache2::XSLoader::load __PACKAGE__;



1;
__END__

=head1 NAME

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




=head1 Synopsis

  use Apache2::Util ();
  
  # OS escape path
  $escaped_path = Apache2::Util::escape_path($path, "a 'long' file.html");
  
  # format time as a string
  my $fmt = "%a, %D %H:%M:%S %Z";
  $fmtdate = Apache2::Util::ht_time($r-&gt;pool, $r-&gt;request_time, $fmt, 0);




=head1 Description

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





=head1 Functions API

C&lt;Apache2::Util&gt; provides the following functions and/or methods:




=head2 C&lt;escape_path&gt;

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

  $escaped_path = Apache2::Util::escape_path($path, $p);
  $escaped_path = Apache2::Util::escape_path($path, $p, $partial);

=over 4

=item arg1: C&lt;$path&gt; ( string )

The path to convert

=item arg2: C&lt;$p&gt;
( C&lt;L&lt;APR::Pool|docs::2.0::api::APR::Pool&gt;&gt; )

The pool to allocate from

=item opt arg3: C&lt;$partial&gt; ( 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 C&lt;"./"&gt; unless C&lt;$path&gt; contains C&lt;:&gt; optionally
followed by C&lt;/&gt;.

the default is TRUE

=item ret: C&lt;$escaped_path&gt; ( string )

The escaped path

=item since: 2.0.00

=back



=head2 C&lt;ht_time&gt;

Convert time from an integer value into a string in a specified format

  $time_str = Apache2::Util::ht_time($p);
  $time_str = Apache2::Util::ht_time($p, $time);
  $time_str = Apache2::Util::ht_time($p, $time, $fmt);
  $time_str = Apache2::Util::ht_time($p, $time, $fmt, $gmt);

=over 4

=item arg1: C&lt;$p&gt;
( C&lt;L&lt;APR::Pool object|docs::2.0::api::APR::Pool&gt;&gt; )

The pool to allocate memory from

=item opt arg2: C&lt;$time&gt; ( number )

The time to convert (e.g., C&lt;time()&gt; or
C&lt;L&lt;$r-E&lt;gt&gt;request_time|docs::2.0::api::Apache2::RequestRec/C_request_time_&gt;&gt;).

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

=item opt arg3: C&lt;$fmt&gt; ( 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"

=item opt arg4: C&lt;$gmt&gt; ( 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.

=item ret: C&lt;$time_str&gt; (string)

The string that represents the specified time

=item since: 2.0.00

=back

Examples:

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

  $fmtdate = Apache2::Util::ht_time($r-&gt;pool);

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

  my $time = time+100;
  $fmtdate = Apache2::Util::ht_time($r-&gt;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::ht_time($r-&gt;pool, $r-&gt;request_time, $fmt, 0);





=head1 See Also

L&lt;mod_perl 2.0 documentation|docs::2.0::index&gt;.




=head1 Copyright

mod_perl 2.0 and its core modules are copyrighted under
The Apache Software License, Version 2.0.




=head1 Authors

L&lt;The mod_perl development team and numerous
contributors|about::contributors::people&gt;.

=cut

</pre></body></html>