cvs commit: modperl/Apache Apache.pm

2003-02-19 Thread stas
stas2003/02/19 22:54:23

  Modified:Apache   Apache.pm
  Log:
  add the reason why the variable gets rendered invalid on
  Apache::unescape_url
  
  Revision  ChangesPath
  1.74  +2 -1  modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- Apache.pm 20 Feb 2003 06:52:10 -  1.73
  +++ Apache.pm 20 Feb 2003 06:54:23 -  1.74
  @@ -1213,7 +1213,8 @@
   
   Handy function for unescapes.  Use this one for
   filenames/paths. Notice that the original C<$string> is mangled in the
  -process (because it shrinks).
  +process (because the string part of PV shrinks, but the variable is
  +not updated, to speed things up).
   
   Use unescape_url_info for the result of submitted form data.
   
  
  
  



cvs commit: modperl/Apache Apache.pm

2003-02-19 Thread stas
stas2003/02/19 22:52:10

  Modified:Apache   Apache.pm
  Log:
  add a note that the original string passed to Apache::unescape_url is
  mangled, so only the return value should be used.
  
  Revision  ChangesPath
  1.73  +6 -1  modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- Apache.pm 13 Aug 2002 03:18:48 -  1.72
  +++ Apache.pm 20 Feb 2003 06:52:10 -  1.73
  @@ -1209,7 +1209,12 @@
   
   =item Apache::unescape_url($string)
   
  -Handy function for unescapes.  Use this one for filenames/paths.
  +  $unescaped_url = Apache::unescape_url($string)
  +
  +Handy function for unescapes.  Use this one for
  +filenames/paths. Notice that the original C<$string> is mangled in the
  +process (because it shrinks).
  +
   Use unescape_url_info for the result of submitted form data.
   
   =item Apache::unescape_url_info($string)
  
  
  



cvs commit: modperl/Apache Apache.pm

2002-05-16 Thread stas

stas02/05/16 08:21:47

  Modified:Apache   Apache.pm
  Log:
  s/PerlScript/PerlRequire/, the former is deprecated
  
  Revision  ChangesPath
  1.71  +1 -1  modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- Apache.pm 24 Jan 2002 14:53:34 -  1.70
  +++ Apache.pm 16 May 2002 15:21:46 -  1.71
  @@ -703,7 +703,7 @@
   =item $s = Apache-Eserver
   
   Same as above, but only available during server startup for use in
  -CPerlE> sections, B or B.
  +CPerlE> sections, B or B.
   
   =item $s-Eserver_admin
   
  
  
  



cvs commit: modperl/Apache Apache.pm

2002-01-24 Thread stas

stas02/01/24 06:53:35

  Modified:Apache   Apache.pm
  Log:
  - escape & chars
  
  Revision  ChangesPath
  1.70  +5 -5  modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- Apache.pm 21 Jan 2002 14:32:34 -  1.69
  +++ Apache.pm 24 Jan 2002 14:53:34 -  1.70
  @@ -776,20 +776,20 @@
   
$list = $r->get_handlers( 'PerlHandler' );
   
  -=item $r-Eset_handlers( $hook, [\&handler, ... ] )
  +=item $r-Eset_handlers( $hook, [\Ehandler, ... ] )
   
   Sets the list if handlers to be called for $hook. $hook is a string
   representing the phase to handle. The list of handlers is an anonymous
   array of code references to the handlers to install for this request
  -phase. The special list [ \&OK ] can be used to disable a particular
  -phase.
  +phase. The special list C<[ \&OK ]> can be used to disable a
  +particular phase.
   
$r->set_handlers( PerlLogHandler => [ \&myhandler1, \&myhandler2 ] );
$r->set_handlers( PerlAuthenHandler => [ \&OK ] );
   
  -=item $r-Epush_handlers( $hook, \&handler )
  +=item $r-Epush_handlers( $hook, \Ehandler )
   
  -Pushes a new handler to be called for $hook. $hook is a string
  +Pushes a new handler to be called for C<$hook>. C<$hook> is a string
   representing the phase to handle. The handler is a reference to a
   subroutine to install for this request phase. This handler will be
   called before any configured handlers.
  
  
  



cvs commit: modperl/Apache Apache.pm

2002-01-21 Thread stas

stas02/01/21 06:32:35

  Modified:Apache   Apache.pm
  Log:
  - document $r->location
  Submitted by: Issac Goldstand <[EMAIL PROTECTED]>
  Reviewed by:  stas
  
  Revision  ChangesPath
  1.69  +6 -0  modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- Apache.pm 14 Jan 2002 03:12:51 -  1.68
  +++ Apache.pm 21 Jan 2002 14:32:34 -  1.69
  @@ -390,6 +390,12 @@
   filename> translation, optionally changing it with the first argument
   if you happen to be doing the translation.
   
  +=item $r-Elocation
  +
  +The $r-Elocation method will return the path of the
  +ELocationE section from which the current C is
  +being called.
  +
   =item $r-Epath_info( [$path_info] )
   
   The $r-Epath_info method will return what is left in the path after the
  
  
  



cvs commit: modperl/Apache Apache.pm

2002-01-13 Thread stas

stas02/01/13 19:12:51

  Modified:Apache   Apache.pm
  Log:
  in get_basic_auth_pw doc use the constants as return codes rather than
  numbers. plus, return value is not always -1 in case of unprotected
  service.
  
  Submitted by: Geoffrey Young <[EMAIL PROTECTED]>
  Reviewed by:  stas
  
  Revision  ChangesPath
  1.68  +3 -2  modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- Apache.pm 2 Jan 2002 09:41:23 -   1.67
  +++ Apache.pm 14 Jan 2002 03:12:51 -  1.68
  @@ -826,8 +826,9 @@
   
   =item $r-Eget_basic_auth_pw
   
  -If the current request is protected by Basic authentication, 
  -this method will return 0, otherwise -1.  
  +If the current request is protected by Basic authentication, this
  +method will return OK.  Otherwise, it will return a value that
  +ought to be propagated back to the client (typically AUTH_REQUIRED).
   The second return value will be the decoded password sent by the client.
   
  ($ret, $sent_pw) = $r->get_basic_auth_pw;
  
  
  



cvs commit: modperl/Apache Apache.pm

2002-01-02 Thread stas

stas02/01/02 01:41:23

  Modified:.cgi_to_mod_perl.pod mod_perl_method_handlers.pod
mod_perl.pod mod_perl_traps.pod
   Apache   Apache.pm
  Log:
  - pod escape [><] chars
  
  Revision  ChangesPath
  1.8   +2 -2  modperl/cgi_to_mod_perl.pod
  
  Index: cgi_to_mod_perl.pod
  ===
  RCS file: /home/cvs/modperl/cgi_to_mod_perl.pod,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- cgi_to_mod_perl.pod   3 Mar 2000 20:41:59 -   1.7
  +++ cgi_to_mod_perl.pod   2 Jan 2002 09:41:23 -   1.8
  @@ -58,7 +58,7 @@
   If you are using Perl 5.004 most CGI scripts can run under mod_perl
   untouched.  If you're using 5.003, Perl's built-in C and
   C functions do not work as they do under CGI.  If you're
  -using CGI.pm, use C<$query->print> instead of plain 'ol C.
  +using CGI.pm, use C<$query-Eprint> instead of plain 'ol C.
   
   =item HEADERS
   
  @@ -73,7 +73,7 @@
   
print "Content-type: text/html\n\n";
   
  -If you're using CGI.pm and 'print $q->header' you do
  +If you're using CGI.pm and 'print $q-Eheader' you do
   _not_ need C.
   
   =item NPH SCRIPTS
  
  
  
  1.9   +2 -2  modperl/mod_perl_method_handlers.pod
  
  Index: mod_perl_method_handlers.pod
  ===
  RCS file: /home/cvs/modperl/mod_perl_method_handlers.pod,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mod_perl_method_handlers.pod  3 Mar 2000 20:41:59 -   1.8
  +++ mod_perl_method_handlers.pod  2 Jan 2002 09:41:23 -   1.9
  @@ -169,8 +169,8 @@
   
   =head1 AUTHOR
   
  -This document is written by Ask Bjoern Hansen <[EMAIL PROTECTED]> or
  -<[EMAIL PROTECTED]>.  Corrections and suggestions are most
  +This document is written by Ask Bjoern Hansen E[EMAIL PROTECTED] or
  +E[EMAIL PROTECTED].  Corrections and suggestions are most
   welcome. In particular would more examples be appreciated, most of my
   own code is way too integrated with our system, which isn't suitable
   for public release.
  
  
  
  1.22  +20 -20modperl/mod_perl.pod
  
  Index: mod_perl.pod
  ===
  RCS file: /home/cvs/modperl/mod_perl.pod,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- mod_perl.pod  25 Nov 2000 15:39:22 -  1.21
  +++ mod_perl.pod  2 Jan 2002 09:41:23 -   1.22
  @@ -36,8 +36,8 @@
   
   =head1 FAQ
   
  -The mod_perl FAQ is maintained by Frank Cringle <[EMAIL PROTECTED]>:
  -http://perl.apache.org/faq/
  +The mod_perl FAQ is maintained by Frank Cringle
  +E[EMAIL PROTECTED]: http://perl.apache.org/faq/
   
   =head1 Apache/Perl API
   
  @@ -69,7 +69,7 @@
   
   See eg/startup.pl for an example to start with.
   
  -In an httpd.conf  or .htaccess you need:
  +In an httpd.conf ELocation /fooE or .htaccess you need:
   
   PerlHandler sub_routine_name
   
  @@ -467,10 +467,10 @@
   
PerlTransHandler OneTrans TwoTrans RedTrans BlueTrans
   
  -With the method, Apache->push_handlers, callbacks can be added to
  +With the method, Apache-Epush_handlers, callbacks can be added to
   the stack by scripts at runtime by mod_perl scripts.
   
  -Apache->push_handlers takes the callback hook name as it's first
  +Apache-Epush_handlers takes the callback hook name as it's first
   argument and a subroutine name or reference as it's second. e.g.:
   
Apache->push_handlers("PerlLogHandler", \&first_one);
  @@ -493,7 +493,7 @@
   
   CGI.pm maintains a global object for it's plain function interface.
   Since the object is global, it does not go out of scope, DESTROY is
  -never called.  CGI->new can call: 
  +never called.  CGI-Enew can call: 
   
Apache->push_handlers("PerlCleanupHandler", \&CGI::_reset_globals);
   
  @@ -526,8 +526,8 @@
PerlHandler  Apache::MsqlProxy
   
   PerlHandler is never actually invoked unless translate() sees the
  -request is a proxy request ($r->proxyreq), if it is a proxy request,
  -translate() set $r->handler("perl-script"), only then will PerlHandler
  +request is a proxy request ($r-Eproxyreq), if it is a proxy request,
  +translate() set $r-Ehandler("perl-script"), only then will PerlHandler
   handle the request.  Now, users do not have to specify 'PerlHandler
   Apache::MsqlProxy', the translate() function can set it with
   push_handlers().
  @@ -601,7 +601,7 @@
   
% perl Makefile.PL PERL_STACKED_HANDLERS=1 [PERL_FOO_HOOK=1,etc]
   
  -Another method 'Apache->can_stack_handlers' will return TRUE if
  +Another method 'Apache-Ecan_stack_handlers' will return TRUE if
   mod_perl was configured with PERL_STACKED_HANDLERS=1, FALSE
   otherwise. 
   
  @@ -611,13 +611,13 @@
   
   =head1 PERL SECTIONS
   
  -With  sections, it is possible to configure your server

cvs commit: modperl/Apache Apache.pm

2001-12-28 Thread cholet

cholet  01/12/28 02:25:48

  Modified:Apache   Apache.pm
  Log:
  more docco
  
  Revision  ChangesPath
  1.66  +23 -7 modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- Apache.pm 2001/12/27 15:44:33 1.65
  +++ Apache.pm 2001/12/28 10:25:48 1.66
  @@ -650,15 +650,29 @@
   authentication realm, from C<$r-Eauth_name>, to determine which set of
   credentials to authenticate.
   
  -=item $r->document_root
  +=item $r->document_root ( [$docroot] )
   
  -Returns a reference to the current value of the per server
  -configuration directive B. To quote the Apache server
  -documentation, "Unless matched by a directive like Alias, the server
  -appends the path from the requested URL to the document root to make
  -the path to the document."  This same value is passed to CGI
  +When called with no argument, returns a reference to the current value
  +of the per server configuration directive B. To quote the
  +Apache server documentation, "Unless matched by a directive like Alias,
  +the server appends the path from the requested URL to the document root
  +to make the path to the document."  This same value is passed to CGI
   scripts in the C environment variable.
   
  +You can also set this value by providing an argument to it. The following
  +example dynamically sets the document root based on the request's
  +"Host:" header:
  +
  +   sub trans_handler
  + {
  +my $r = shift;
  +my ($user) = ($r->header_in('Host') =~ /^[^\.]+/);
  +$r->document_root("/home/$user/www");
  +return DECLINED;
  + }
  +
  +   PerlTransHandler trans_handler
  +
   =item $r->allow_options
   
   The C<$r-Eallow_options> method can be used for
  @@ -960,7 +974,9 @@
   =item $r->no_cache( $boolean )
   
   This is a flag that indicates that the data being returned is volatile
  -and the client should be told not to cache it.
  +and the client should be told not to cache it. C<$r-Eno_cache(1)>
  +adds the headers "Pragma: no-cache" and "Cache-control: no-cache" to
  +the reponse, therefore it must be called before C<$r-Esend_http_header>.
   
   =item $r->print( @list )
   
  
  
  



cvs commit: modperl/Apache Apache.pm

2001-12-27 Thread cholet

cholet  01/12/27 07:44:33

  Modified:Apache   Apache.pm
  Log:
  document current_callback()
  
  Revision  ChangesPath
  1.65  +9 -0  modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- Apache.pm 2001/05/01 17:28:34 1.64
  +++ Apache.pm 2001/12/27 15:44:33 1.65
  @@ -776,6 +776,15 @@
   
$r->push_handlers( PerlHandler => \&footer);
   
  +=item $r->current_callback
  +
  +Returns the name of the handler currently being run. This method is most
  +useful to PerlDispatchHandlers who wish to only take action for certain phases.
  +
  + if($r->current_callback eq "PerlLogHandler") {
  + $r->warn("Logging request");
  + }
  +
   =back
   
   =head1 SETTING UP THE RESPONSE
  
  
  



RE: cvs commit: modperl/Apache Apache.pm

2001-04-30 Thread Matt Sergeant

On Mon, 30 Apr 2001, Geoffrey Young wrote:

> maybe I was taking advantage of a feature I shouldn't have been using?

Yes, config directives created by Apache::ExtUtils :-)

-- 


/||** Founder and CTO  **  **   http://axkit.com/ **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
 \\//
 //\\
//  \\




RE: cvs commit: modperl/Apache Apache.pm

2001-04-30 Thread Geoffrey Young



> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 1:31 AM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: modperl/Apache Apache.pm
> 
> 
> dougm   01/04/25 22:30:46
> 
>   Modified:.Changes
>Apache   Apache.pm
>   Log:
>   fix double-loading bug of Perl{Require,Module}s at startup time

hmmm... has anyone else noticed some strange behavior here?  it seems that
since this patch went in I can't use startup.pl
to preload my modules in such a way that my custom directives get seen as
well...

I mean, that I used to use just
use Apache::Dispatch;
in a startup.pl and my custom directives would work just fine.  

now, I get errors unless I use
PerlModule Apache::Dispatch

maybe I was taking advantage of a feature I shouldn't have been using?

--Geoff





cvs commit: modperl/Apache Apache.pm

2001-04-25 Thread dougm

dougm   01/04/25 22:30:46

  Modified:.Changes
   Apache   Apache.pm
  Log:
  fix double-loading bug of Perl{Require,Module}s at startup time
  
  Revision  ChangesPath
  1.588 +2 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.587
  retrieving revision 1.588
  diff -u -r1.587 -r1.588
  --- Changes   2001/04/17 22:39:06 1.587
  +++ Changes   2001/04/26 05:30:44 1.588
  @@ -10,6 +10,8 @@
   
   =item 1.25_01-dev
   
  +fix double-loading bug of Perl{Require,Module}s at startup time
  +
   improve Apache::MyConfig [Stas Bekman <[EMAIL PROTECTED]>]
   
   back out 'stop win32 crash when bringing down service' change, no
  
  
  
  1.63  +4 -1  modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- Apache.pm 2001/01/29 16:07:08 1.62
  +++ Apache.pm 2001/04/26 05:30:45 1.63
  @@ -30,7 +30,10 @@
   
   sub httpd_conf {
   shift;
  -push @Apache::ReadConfig::PerlConfig,
  +no strict 'refs';
  +#use a symbolic reference so %Apache::ReadConfig::
  +#is empty at compile time
  +push @{"Apache::ReadConfig::PerlConfig"},
 map "$_\n", @_;
   }
   
  
  
  



cvs commit: modperl/Apache Apache.pm

2001-01-24 Thread dougm

dougm   01/01/25 00:10:16

  Modified:.Changes ToDo
   Apache   Apache.pm
  Log:
  document Apache->server->register_cleanup
  
  Revision  ChangesPath
  1.573 +3 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.572
  retrieving revision 1.573
  diff -u -r1.572 -r1.573
  --- Changes   2001/01/25 07:43:05 1.572
  +++ Changes   2001/01/25 08:10:15 1.573
  @@ -10,6 +10,9 @@
   
   =item 1.24_02-dev
   
  +document Apache->server->register_cleanup
  +[Perrin Harkins <[EMAIL PROTECTED]>]
  +
   Apache::Server->loglevel can now be modified
   [Geoffrey Young <[EMAIL PROTECTED]>]
   
  
  
  
  1.269 +0 -3  modperl/ToDo
  
  Index: ToDo
  ===
  RCS file: /home/cvs/modperl/ToDo,v
  retrieving revision 1.268
  retrieving revision 1.269
  diff -u -r1.268 -r1.269
  --- ToDo  2001/01/25 07:43:05 1.268
  +++ ToDo  2001/01/25 08:10:15 1.269
  @@ -16,9 +16,6 @@
   - From: Paul Walmsley <[EMAIL PROTECTED]>
 Subject: BUG: mod_perl >= 1.23 on Perl 5.6 uses stdout fd for STDIN and STDOUT
   
  -- From: Perrin Harkins <[EMAIL PROTECTED]>
  -  Subject: Re: How to recognize server shutdown?
  -
   - From: Wenzhong Tang <[EMAIL PROTECTED]>
 Subject: RE: Prototype mismatch in Apache::PerlRun line 343
   
  
  
  
  1.61  +7 -0  modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- Apache.pm 2000/12/20 08:07:34 1.60
  +++ Apache.pm 2001/01/25 08:10:16 1.61
  @@ -1068,6 +1068,13 @@
  warn "registered cleanup called for ", $r->uri, "\n";
  });
   
  +Cleanup functions registered in the parent process (before forking)
  +will run once when the server is shut down:
  +
  +   #PerlRequire startup.pl
  +   warn "parent pid is $$\n";
  +   Apache->server->register_cleanup(sub { warn "server cleanup in $$\n"});
  +
   The I method is simply an alias for I, 
   as this method may be used to run code after the client connection is closed,
   which may not be a I.
  
  
  



RE: cvs commit: modperl/Apache Apache.pm

2000-11-27 Thread Geoffrey Young

a PerlSetVar foo following a PerlAddVar foo is supposed to reset the value
of foo, clearing the previous array (IIRC)

might be worth noting...

also, once you use the Apache::Table interface for either, you can call
set() in addition to add().  Doug thought that this might only set it for
the lifetime of the child, not permanently.  I haven't verified this either
way (only that it works for my needs :)

--Geoff

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, November 25, 2000 10:39 AM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: modperl/Apache Apache.pm
> 
> 
> sbekman 00/11/25 07:39:25
> 
>   Modified:.Changes mod_perl.pod
>Apache   Apache.pm
>   Log:
>   Documenting the new PerlAddVar httpd.conf directive. Please 
> verify that I
>   didn't do any mistakes since I've added this from my notes 
> made about 6
>   months ago. Thanks.
>   
>   Revision  ChangesPath
>   1.549 +3 -0  modperl/Changes
>   
>   Index: Changes
>   ===
>   RCS file: /home/cvs/modperl/Changes,v
>   retrieving revision 1.548
>   retrieving revision 1.549
>   diff -u -r1.548 -r1.549
>   --- Changes 2000/11/07 23:09:19 1.548
>   +++ Changes 2000/11/25 15:39:21 1.549
>   @@ -10,6 +10,9 @@
>
>=item 1.24_02-dev
>
>   +Documenting the new PerlAddVar httpd.conf directive
>   +[Stas Bekman <[EMAIL PROTECTED]>]
>   +
>new Apache::test::static_modules() method
>[Ken Williams <[EMAIL PROTECTED]>]
>
>   
>   
>   
>   1.21  +28 -5 modperl/mod_perl.pod
>   
>   Index: mod_perl.pod
>   ===
>   RCS file: /home/cvs/modperl/mod_perl.pod,v
>   retrieving revision 1.20
>   retrieving revision 1.21
>   diff -u -r1.20 -r1.21
>   --- mod_perl.pod2000/03/05 23:46:30 1.20
>   +++ mod_perl.pod2000/11/25 15:39:22 1.21
>   @@ -167,15 +167,38 @@
>
>=item CONFIGURATION
>
>   -The C directive provides a simple mechanism for passing
>   -information from configuration files to Perl modules or 
> Registry scripts:
>   +The C and C directives provide a simple
>   +mechanism for passing information from configuration files to Perl
>   +modules or Registry scripts.
>
>   +The C directive allows you to set a key/value pair.
>   +
> PerlSetVar  SomeKey  SomeValue
>
>Perl modules or scripts retrieve configuration values using the
>   -C<$r-Edir_config> method (see 'perldoc Apache').
>   +C<$r-Edir_config> method.
>   +
>   +  $SomeValue = $r->dir_config('SomeKey');
>   +
>   +The C directive allows you to emulate Perl arrays:
>   +
>   + PerlAddVar  SomeKey  FirstValue
>   + PerlAddVar  SomeKey  SecondValue
>   + ... ...  ...
>   + PerlAddVar  SomeKey  Nth-Value
>   +
>   +In the Perl modules the values are extracted using the
>   +C<$r-Edir_config-Eget> method.
>   +
>   +  @array = $r->dir_config->get('SomeKey');
>   +
>   +Alternatively in your code you can extend the setting with:
>   +
>   +  $r->dir_config->add(SomeKey => 'Bar');
>   +
>   +C and C handle keys case-insensitively.
>   +
>
>   -C handles keys case-insensitively.
>
>=item GATEWAY_INTERFACE
>
>   @@ -790,7 +813,7 @@
>
>=head1 REVISION
>
>   -$Id: mod_perl.pod,v 1.20 2000/03/05 23:46:30 dougm Exp $
>   +$Id: mod_perl.pod,v 1.21 2000/11/25 15:39:22 sbekman Exp $
>
>=head1 AUTHOR
>
>   
>   
>   
>   1.59  +23 -0 modperl/Apache/Apache.pm
>   
>   Index: Apache.pm
>   ===
>   RCS file: /home/cvs/modperl/Apache/Apache.pm,v
>   retrieving revision 1.58
>   retrieving revision 1.59
>   diff -u -r1.58 -r1.59
>   --- Apache.pm   2000/11/07 23:09:25 1.58
>   +++ Apache.pm   2000/11/25 15:39:24 1.59
>   @@ -589,6 +589,29 @@
>I class when called in a scalar context with no
>"key" argument. See I.
>
>   +
>   +=item $r->dir_config->get( $key )
>   +
>   +Returns the value of a per-directory array variable 
> specified by the
>   +C directive.
>   +
>   +   # 
>   +   # PerlAddVar  Key  Value1
>   +   # PerlAddVar  Key  Value2
>   +   # 
>   +
>   +   my @val = $r->dir_config->get('Key');
>   +
>   +Alternatively in your code you can extend the setting with:
>   +
>   +  $r->dir_config->add(Key => 'Value3');
>   +
>   +Keys are case-insensitive.
>   +
>   +Will return a I reference blessed into the
>   +I class when called in a scalar context with no
>   +"key" argument. See I.
>   +
>=item $r->requires
>
>Returns an array reference of hash references, containing 
> information
>   
>   
>   
> 



cvs commit: modperl/Apache Apache.pm

2000-11-25 Thread sbekman

sbekman 00/11/25 07:39:25

  Modified:.Changes mod_perl.pod
   Apache   Apache.pm
  Log:
  Documenting the new PerlAddVar httpd.conf directive. Please verify that I
  didn't do any mistakes since I've added this from my notes made about 6
  months ago. Thanks.
  
  Revision  ChangesPath
  1.549 +3 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.548
  retrieving revision 1.549
  diff -u -r1.548 -r1.549
  --- Changes   2000/11/07 23:09:19 1.548
  +++ Changes   2000/11/25 15:39:21 1.549
  @@ -10,6 +10,9 @@
   
   =item 1.24_02-dev
   
  +Documenting the new PerlAddVar httpd.conf directive
  +[Stas Bekman <[EMAIL PROTECTED]>]
  +
   new Apache::test::static_modules() method
   [Ken Williams <[EMAIL PROTECTED]>]
   
  
  
  
  1.21  +28 -5 modperl/mod_perl.pod
  
  Index: mod_perl.pod
  ===
  RCS file: /home/cvs/modperl/mod_perl.pod,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_perl.pod  2000/03/05 23:46:30 1.20
  +++ mod_perl.pod  2000/11/25 15:39:22 1.21
  @@ -167,15 +167,38 @@
   
   =item CONFIGURATION
   
  -The C directive provides a simple mechanism for passing
  -information from configuration files to Perl modules or Registry scripts:
  +The C and C directives provide a simple
  +mechanism for passing information from configuration files to Perl
  +modules or Registry scripts.
   
  +The C directive allows you to set a key/value pair.
  +
PerlSetVar  SomeKey  SomeValue
   
   Perl modules or scripts retrieve configuration values using the
  -C<$r-Edir_config> method (see 'perldoc Apache').
  +C<$r-Edir_config> method.
  +
  +  $SomeValue = $r->dir_config('SomeKey');
  +
  +The C directive allows you to emulate Perl arrays:
  +
  + PerlAddVar  SomeKey  FirstValue
  + PerlAddVar  SomeKey  SecondValue
  + ... ...  ...
  + PerlAddVar  SomeKey  Nth-Value
  +
  +In the Perl modules the values are extracted using the
  +C<$r-Edir_config-Eget> method.
  +
  +  @array = $r->dir_config->get('SomeKey');
  +
  +Alternatively in your code you can extend the setting with:
  +
  +  $r->dir_config->add(SomeKey => 'Bar');
  +
  +C and C handle keys case-insensitively.
  +
   
  -C handles keys case-insensitively.
   
   =item GATEWAY_INTERFACE
   
  @@ -790,7 +813,7 @@
   
   =head1 REVISION
   
  -$Id: mod_perl.pod,v 1.20 2000/03/05 23:46:30 dougm Exp $
  +$Id: mod_perl.pod,v 1.21 2000/11/25 15:39:22 sbekman Exp $
   
   =head1 AUTHOR
   
  
  
  
  1.59  +23 -0 modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- Apache.pm 2000/11/07 23:09:25 1.58
  +++ Apache.pm 2000/11/25 15:39:24 1.59
  @@ -589,6 +589,29 @@
   I class when called in a scalar context with no
   "key" argument. See I.
   
  +
  +=item $r->dir_config->get( $key )
  +
  +Returns the value of a per-directory array variable specified by the
  +C directive.
  +
  +   # 
  +   # PerlAddVar  Key  Value1
  +   # PerlAddVar  Key  Value2
  +   # 
  +
  +   my @val = $r->dir_config->get('Key');
  +
  +Alternatively in your code you can extend the setting with:
  +
  +  $r->dir_config->add(Key => 'Value3');
  +
  +Keys are case-insensitive.
  +
  +Will return a I reference blessed into the
  +I class when called in a scalar context with no
  +"key" argument. See I.
  +
   =item $r->requires
   
   Returns an array reference of hash references, containing information
  
  
  



cvs commit: modperl/Apache Apache.pm

2000-11-07 Thread ask

ask 00/11/07 15:09:27

  Modified:.Changes
   Apache   Apache.pm
  Log:
  Improved Apache->send_http_header documentation
  [Ken Williams <[EMAIL PROTECTED]>]
  
  Revision  ChangesPath
  1.548 +3 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.547
  retrieving revision 1.548
  diff -u -r1.547 -r1.548
  --- Changes   2000/10/13 17:21:11 1.547
  +++ Changes   2000/11/07 23:09:19 1.548
  @@ -13,6 +13,9 @@
   new Apache::test::static_modules() method
   [Ken Williams <[EMAIL PROTECTED]>]
   
  +Improved Apache->send_http_header documentation
  +[Ken Williams <[EMAIL PROTECTED]>]
  +
   =item 1.24_01 - October 10, 2000
   
   fix bug in $r->args that treats ?0 as the empty string instead of zero,
  
  
  
  1.58  +3 -1  modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- Apache.pm 2000/10/10 16:33:56 1.57
  +++ Apache.pm 2000/11/07 23:09:25 1.58
  @@ -757,9 +757,11 @@
   
   =over 4
   
  -=item $r->send_http_header
  +=item $r->send_http_header( [$content_type] )
   
   Send the response line and all headers to the client.
  +Takes an optional parameter indicating the content-type of the
  +response, i.e. 'text/html'.
   
   This method will create headers from the $r->content_xxx() and
   $r->no_cache() attributes (described below) and then append the
  
  
  



cvs commit: modperl/Apache Apache.pm

2000-09-28 Thread dougm

dougm   00/09/28 09:19:59

  Modified:.Changes
   src/modules/perl Apache.xs
   Apache   Apache.pm
  Log:
  fix bug where Apache::send_http_header was resetting r->status = 200
  
  Revision  ChangesPath
  1.533 +3 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.532
  retrieving revision 1.533
  diff -u -r1.532 -r1.533
  --- Changes   2000/09/28 15:18:58 1.532
  +++ Changes   2000/09/28 16:19:52 1.533
  @@ -10,6 +10,9 @@
   
   =item 1.24_01-dev
   
  +fix bug where Apache::send_http_header was resetting r->status = 200
  +thanks to brian d foy for the spot
  +
   make extra sure Apache::Constants::AUTOLOAD does not recurse looking
   for sub __AUTOLOAD [Jim Winstead <[EMAIL PROTECTED]>]
   
  
  
  
  1.112 +0 -1  modperl/src/modules/perl/Apache.xs
  
  Index: Apache.xs
  ===
  RCS file: /home/cvs/modperl/src/modules/perl/Apache.xs,v
  retrieving revision 1.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- Apache.xs 2000/09/27 23:51:33 1.111
  +++ Apache.xs 2000/09/28 16:19:56 1.112
  @@ -929,7 +929,6 @@
   r->content_type = pstrdup(r->pool, type);
   send_http_header(r);
   mod_perl_sent_header(r, 1);
  -r->status = 200; /* XXX, why??? */
   
   #ifndef PERL_OBJECT
   
  
  
  
  1.54  +2 -1  modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- Apache.pm 2000/08/31 05:49:05 1.53
  +++ Apache.pm 2000/09/28 16:19:56 1.54
  @@ -180,7 +180,8 @@
else {
$not_sent = 1;
}
  - $r->send_http_header if $not_sent;
  + $r->send_http_header if
  +  $not_sent and $r->status == 200;
$r->print($headers); #send rest of buffer, without stripping newlines!!!
last;
}
  
  
  



cvs commit: modperl/Apache Apache.pm

2000-06-15 Thread cholet

cholet  00/06/15 01:13:37

  Modified:Apache   Apache.pm
  Log:
  backing out $Apache::Server::ConfigTestOnly documentation
  
  Revision  ChangesPath
  1.51  +0 -17 modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- Apache.pm 2000/05/19 10:06:07 1.50
  +++ Apache.pm 2000/06/15 08:13:36 1.51
  @@ -1128,23 +1128,6 @@
   
   Set to true when the server is starting.
   
  -=item $Apache::Server::ConfigTestOnly
  -
  -Set to true when the server is running in configuration test mode
  -(C).
  -
  -   
  -# don't continue if it's a config test!
  -print("Skipping the  code!\n"),
  -return if $Apache::Server::ConfigTestOnly;
  -   
  -print "Running the  code!\n"
  -# some code here
  -   
  -   
  -
  -This variable is not available under Win32.
  -
   =back
   
   =head1 SEE ALSO
  
  
  



cvs commit: modperl/Apache Apache.pm

2000-05-19 Thread cholet

cholet  00/05/19 03:06:08

  Modified:.Changes
   Apache   Apache.pm
  Log:
  doc update
  
  Revision  ChangesPath
  1.487 +1 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.486
  retrieving revision 1.487
  diff -u -r1.486 -r1.487
  --- Changes   2000/05/17 05:44:25 1.486
  +++ Changes   2000/05/19 10:06:04 1.487
  @@ -16,6 +16,7 @@
   
   variable $Apache::Server::ConfigTestOnly is set to 1 if Apache
   is running in configuration test mode (httpd -t)
  +(not unavailable under Win32)
   [Eric Cholet <[EMAIL PROTECTED]>]
   
   add PerlAddVar directive, like PerlSetVar, but uses ap_table_add
  
  
  
  1.50  +1 -0  modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- Apache.pm 2000/05/16 14:48:40 1.49
  +++ Apache.pm 2000/05/19 10:06:07 1.50
  @@ -1143,6 +1143,7 @@
  
  
   
  +This variable is not available under Win32.
   
   =back
   
  
  
  



cvs commit: modperl/Apache Apache.pm

2000-05-16 Thread cholet

cholet  00/05/16 07:48:40

  Modified:Apache   Apache.pm
  Log:
  document global Apache variables
  
  Revision  ChangesPath
  1.49  +30 -0 modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- Apache.pm 2000/05/05 08:10:39 1.48
  +++ Apache.pm 2000/05/16 14:48:40 1.49
  @@ -1116,6 +1116,36 @@
   
   =back
   
  +=head1 GLOBAL VARIABLES
  +
  +=over 4
  +
  +=item $Apache::Server::Starting
  +
  +Set to true when the server is starting.
  +
  +=item $Apache::Server::ReStarting
  +
  +Set to true when the server is starting.
  +
  +=item $Apache::Server::ConfigTestOnly
  +
  +Set to true when the server is running in configuration test mode
  +(C).
  +
  +   
  +# don't continue if it's a config test!
  +print("Skipping the  code!\n"),
  +return if $Apache::Server::ConfigTestOnly;
  +   
  +print "Running the  code!\n"
  +# some code here
  +   
  +   
  +
  +
  +=back
  +
   =head1 SEE ALSO
   
   perl(1),
  
  
  



cvs commit: modperl/Apache Apache.pm

2000-05-05 Thread cholet

cholet  00/05/05 01:10:39

  Modified:.Changes
   Apache   Apache.pm
  Log:
  doc update
  
  Revision  ChangesPath
  1.478 +3 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.477
  retrieving revision 1.478
  diff -u -r1.477 -r1.478
  --- Changes   2000/05/04 04:52:34 1.477
  +++ Changes   2000/05/05 08:10:33 1.478
  @@ -10,6 +10,9 @@
   
   =item 1.23_01-dev
   
  +document Apache::print's special behavior wrt references
  +[Jeffrey W. Baker <[EMAIL PROTECTED]>]
  +
   fix core dump triggered by do 'foo.pl',
   thanks to Robert S. Thau for the spot
   
  
  
  
  1.48  +15 -1 modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- Apache.pm 2000/04/27 22:29:47 1.47
  +++ Apache.pm 2000/05/05 08:10:39 1.48
  @@ -909,7 +909,21 @@
   =item $r->print( @list )
   
   This method sends data to the client with C<$r-Ewrite_client>, but first
  -sets a timeout before sending with C<$r-Ehard_timeout>.
  +sets a timeout before sending with C<$r-Ehard_timeout>. This method is
  +called instead of CORE::print when you use print() in your mod_perl programs.
  +
  +This method treats scalar references specially. If an item in @list is a
  +scalar reference, it will be dereferenced before printing. This is a
  +performance optimization which prevents unneeded copying of large strings,
  +and it is subtly different from Perl's standard print() behavior.
  +
  +Example:
  +
  +   $foo = \"bar"; print($foo);
  +
  +The result is "bar", not the "SCALAR(0xDEADBEEF)" you might have expected. If
  +you really want the reference to be printed out, force it into a scalar
  +context by using C.
   
   =item $r->send_fd( $filehandle )
   
  
  
  



cvs commit: modperl/Apache Apache.pm

2000-04-27 Thread dougm

dougm   00/04/27 15:29:47

  Modified:.Changes
   Apache   Apache.pm
  Log:
  fix Apache->httpd_conf
  
  Revision  ChangesPath
  1.475 +2 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.474
  retrieving revision 1.475
  diff -u -r1.474 -r1.475
  --- Changes   2000/04/21 19:37:45 1.474
  +++ Changes   2000/04/27 22:29:46 1.475
  @@ -10,6 +10,8 @@
   
   =item 1.23_01-dev
   
  +fix Apache->httpd_conf, thanks to Will Trillich for the spot
  +
   fixed 'make clean' to remove FILES => passed to MakeMaker
   
   =item 1.23 - April 20, 2000
  
  
  
  1.47  +6 -8  modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- Apache.pm 2000/04/05 04:55:55 1.46
  +++ Apache.pm 2000/04/27 22:29:47 1.47
  @@ -24,16 +24,14 @@
   __PACKAGE__->mod_perl::boot($VERSION);
   }
   
  -if($ENV{MOD_PERL} && perl_hook("Sections")) {
  +BEGIN {
   *Apache::ReadConfig:: = \%ApacheReadConfig::;
  +}
   
  -if(Apache::Constants::MODULE_MAGIC_NUMBER() >= 19971026) {
  - *Apache::httpd_conf = sub {
  - shift;
  - push @Apache::ReadConfig::PerlConfig,
  - map "$_\n", @_;
  - };
  -}
  +sub httpd_conf {
  +shift;
  +push @Apache::ReadConfig::PerlConfig,
  +  map "$_\n", @_;
   }
   
   sub parse_args {