stas        2004/08/13 17:23:05

  Modified:    src/docs/2.0/api/Apache Util.pod
  Log:
  complete manpage
  
  Revision  Changes    Path
  1.6       +60 -41    modperl-docs/src/docs/2.0/api/Apache/Util.pod
  
  Index: Util.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/Util.pod,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -u -r1.5 -r1.6
  --- Util.pod  2 Aug 2004 05:34:23 -0000       1.5
  +++ Util.pod  14 Aug 2004 00:23:05 -0000      1.6
  @@ -1,6 +1,6 @@
   =head1 NAME
   
  -Apache::Util - Perl API for XXX
  +Apache::Util - Perl API for Misc Apache Utility functions
   
   
   
  @@ -8,15 +8,21 @@
   =head1 Synopsis
   
     use Apache::Util ();
  -
  -META: to be completed
  +  
  +  # OS escape path
  +  $escaped_path = Apache::Util::escape_path($path, "a 'long' file.html");
  +  
  +  # format time as a string
  +  my $fmt = "%a, %D %H:%M:%S %Z";
  +  $fmtdate = Apache::Util::ht_time($r->pool, $r->request_time, $fmt, 0);
   
   
   
   
   =head1 Description
   
  -META: to be completed
  +Various Apache utilities that don't fit into any other group.
  +
   
   
   
  @@ -28,26 +34,68 @@
   
   
   
  +=head2 C<escape_path>
  +
  +convert an OS path to a URL in an OS dependant way.
  +
  +  $escaped_path = Apache::Util::escape_path($path, $p);
  +  $escaped_path = Apache::Util::escape_path($path, $p, $partial);
  +
  +=over 4
  +
  +=item arg1: C<$path> ( string )
  +
  +The path to convert
  +
  +=item arg2: C<$p>
  +( C<L<APR::Pool|docs::2.0::api::APR::Pool>> )
  +
  +The pool to allocate from
  +
  +=item opt arg3: C<$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 C<"./"> unless C<$path> contains C<:> optionally
  +followed by C</>.
  +
  +the default is TRUE
  +
  +=item ret: C<$escaped_path> ( string )
  +
  +The escaped path
  +
  +=item since: 1.99_12
  +
  +=back
  +
  +
  +
   =head2 C<ht_time>
   
   Convert time from an integer value into a string in a specified format
   
  +  $time_str = Apache::Util::ht_time($p);
  +  $time_str = Apache::Util::ht_time($p, $time);
  +  $time_str = Apache::Util::ht_time($p, $time, $fmt);
     $time_str = Apache::Util::ht_time($p, $time, $fmt, $gmt);
   
   =over 4
   
  -=item arg1: C<$p> (C<L<APR::Pool|docs::2.0::api::APR::Pool>>)
  +=item arg1: C<$p>
  +( C<L<APR::Pool object|docs::2.0::api::APR::Pool>> )
   
   The pool to allocate memory from
   
  -=item opt arg2: C<$time> (number)
  +=item opt arg2: C<$time> ( number )
   
   The time to convert (e.g., C<time()> or
   
C<L<$r-E<gt>request_time|docs::2.0::api::Apache::RequestRec/C_request_time_>>).
   
   If the value is not passed the current time will be used.
   
  -=item opt arg3: C<$fmt> (string)
  +=item opt arg3: C<$fmt> ( string )
   
   The format to use for the conversion, using strftime(3) tokens.
   
  @@ -55,16 +103,18 @@
   
     "%a, %d %b %Y %H:%M:%S %Z"
   
  -=item opt arg4: C<$gmt> (integer)
  +=item opt arg4: C<$gmt> ( boolean )
   
  -The time will be not converted to GMT if 0 is passed.
  +The time will be not converted to GMT if FALSE is passed.
   
  -If the value is not passed 1 (do convert) is used as a default.
  +If the value is not passed TRUE (do convert) is used as a default.
   
   =item ret: C<$time_str> (string)
   
   The string that represents the specified time
   
  +=item since: 1.99_12
  +
   =back
   
   Examples:
  @@ -84,37 +134,6 @@
     my $fmt = "%a, %D %H:%M:%S %Z";
     $fmtdate = Apache::Util::ht_time($r->pool, $r->request_time, $fmt, 0);
   
  -
  -
  -
  -=head2 C<escape_path>
  -
  -META: Autogenerated - needs to be reviewed/completed
  -
  -convert an OS path to a URL in an OS dependant way.
  -
  -  $path = Apache::escape_path($path, $p, $partial);
  -
  -=over 4
  -
  -=item arg1: C<$path> (string)
  -
  -The path to convert
  -
  -=item arg2: C<$p> (C<L<APR::Pool|docs::2.0::api::APR::Pool>>)
  -
  -The pool to allocate from
  -
  -=item arg3: C<$partial> (integer)
  -
  -if set, assume that the path will be appended to something with a '/'
  -in it (and thus does not prefix "./")
  -
  -=item ret: C<$path> (string)
  -
  -The converted URL
  -
  -=back
   
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to