#########################
# Nice to have features #
#########################

* PerlPreConnectionHandler is implemented, but the 'void *csd' arg in
  the callback is ignored. will require a modification of
  modperl_callback_run_handlers to pass yet another optional argument.

  Status: most likely nobody will ever want to use this option, so
  don't waste time working on it.

* Apache::FakeRequest:
  since APR can be used outside of httpd, and we can alloc request_rec
  and similar structures, it should be possible to bootstrap an
  inside-httpd interface and outside-httpd interface.  its not really
  worthwhile looking at until APR actually installs its *.so or *.a
  libraries somewhere apxs can find them.  and, there's a bunch of util
  functions (e.g. URI stuff) that is supposed to move from httpd into
  apr-util.

* could add support for embedding apache directives into perl
  directives values, e.g. interpolating $ServerRoot

  PerlSwitches -I$ServerRoot/lib/perl

* Since now we have protocol modules, it'd be nice to have a similar
  thing to PerlCleanupHandler, which works only for HTTP requests. 
  It should probably be called PerlConnectionCleanupHandler.

  If we add it we should probably rename PerlCleanupHadndler to
  PerlRequestCleanupHandler and keep the old name as a deprecated alias.

  We could also have PerlServerCleanupHandler, but that's exactly what
  PerlChildExitHandler does. Consider having ServerCleanup as an alias.

config features:
----------------

- tie %ENV to r->subprocess_env so stores are added to
  r->subprocess_env and fetches are looked up in there and elsewhere
  (e.g. HTTP_* from r->headers_in).  see modperl_env.c, current
  implementation is not threadsafe and requires 5.7.2+
 
- make 'PerlSetVar $Foo value' work like 'local $Foo = value' 
  for the given location

- allow Perl*Handler's to have arguments in config files

- allow <Perl></Perl> configuration sections to have read access to internal
  configuration structures (would be nice if we could tie a %namespace::) 

- setuid/gid before running any Perl code

- implement PerlINC (or similar) as a nicer interface for the working
  PerlSwitches -Mlib=/home/dev1/lib/perl, to set different @INC for
  different virtual hosts.
  See the thread: http://marc.theaimsgroup.com/?t=100554858800001&r=1&w=2

- a possible implementation of PerlOptions +Inherit, similar to
  +Parent but which allows virtual hosts to inherit everything that
  was loaded by the main server, at the point of their definition in
  the config file. This can make it easier to write configuration
  files where there is a common base of modules to be loaded in all
  servers. Of course this can be done by putting all these common
  modules and code into foo.pl and running it from the base server and
  all virtual hosts.

-  PerlModule can be made more efficient using Perl_load_module

  Status: it's possible to implement, but currently there is no way to
          prevent from Perl logging the loading error messages to the
          console
  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-03/msg00319.html

perl language features:
----------------------

- @ARGV magic, tie to query string

- sub handler : method ($) {}
  call $class->new($r) and pass the returned object as the first and
  only arg to the method handler

- some mod_perlIO/PerlIO type methods for xs modules? (e.g. Apache::Peek)

- possible to support BEGIN,CHECK,INIT blocks similar to how END is
  supported via ModPerl::Global::special_list_{call,clear}



optimization features:
---------------------

- copy-on-write SvPVX

- hook Perl malloc into apr_pool

- for "compiled handlers" w/ ithreads manage SV allocation via
  server-lifetime apr_pool_t

- "garbage collector" thread to walk padlists looking for certain things
   worth releasing.

- "mip manager" thread to watch # of active interpreters,
  cloning/destroying when needed (rather than waiting for a request to
  trigger)

- use subpools per-callback/handler (might trim some memory bloat)
  note: creating subpools requires a malloc mutex lock with threaded
  mpms

api:
---

- improve the "stacked handlers" implementation, including:
  + allow push_handlers to have an additional argument, an array ref,
    which will be passed to the handler as arguments, e.g.
    $r->push_handlers("PerlHandler", \&some_sub, ['one', 'two', 'etc']);

- might add an alias for $filter->connection (now we have $filter->c), to be
  more intuitive since we have $r->connection.

modules:
-------

- Apache::Registry should check return value of the subroutine,
  e.g. for REDIRECT   

- should Apache::Registry use filename instead of vhost_name+uri?

- core Apache::SubProcess w/ proper CORE::GLOBAL::{fork,exec} support
  + currently works only with $] >= 5.007003 (see the
    apache/subprocess test)

- It's possible that we will add:

  #ifdef MP_APACHE_COMPAT
       modperl_require_module("Apache::compat");
  #endif

  if MP_APACHE_COMPAT Makefile.PL option is true. But this adds bloat,
  so this is just an option to consider.

- Apache::File->tmpfile now lives only in compat. Consider adding
  APR::File->mktemp (apr_file_mktemp) and a perlio layer
  defined in terms of apr_file_t to use it.

new modules:
-----------

- apache.pm: use apache '1.3b3';

misc new stuff:
--------------

- 'make html'

- 'make test_report'

apache features that would be neat for mod_perl:
-----------------------------------------------

- "autoload" hook for configuration directives