I am perhaps seriously missing your point.  The stuff in chapter 8 is 
mainly about httpd.conf -- custom config directives for you module and 
using perl to configure apache.  There's nothing really there about 
.htaccess.  If you are planning to use PerlSetVar directives in .htaccess, 
there's nothing special you need to do other than read their value.  On pp 
455-456, check the description of dir_config().  From what your describing 
below, you don't need to make custom directives, and anyway, PerSetVar and 
custom directives are two entirely different things.  You simply use them, 
you don't define them in Makefile.PL.

Or am I simply missing what you're trying to do?

-- Rob

--On 06/10/00 00:58:20 -0400 "J. Horner" <[EMAIL PROTECTED]> wrote:

> I'm working with Chapter 8 of the Eagle book to make an automatic
> installer for my new module.
>
> This isn't quite the easiest thing in the book.
>
> I have a module that will need 3 parameters set via .htaccess
> file:
>
> $DEBUG = 0 or 1 (off or on)
> $time_limit = number of seconds before a user is timed out
> $max_limit = default maximum inactive time before timeout.
>
> To set them in the .htaccess file, I think I want to use
> something like the following:
>
> PerlSetVar TimeOut 'debug => 1, TIME_LIMIT => 900, MAX_LIMIT =>
> 900'
>
> I think I will need something like this in my main module file:
>
> sub TimeOut ($$$$) {
>        my ($cfg, $parms, $option, $setting) = @_;
>        $cfg->{TimeOut}{$option} = $setting;
>        }
>
> And to use these, I will need to do something like:
>
> my %mappings = ();
> if(my $cfg = Apache::ModuleConfig->get($r)) {
>        %mappings = %{ $cfg->{TimeOut} } if $cfg->{TimeOut};
> }
>
> And call them like so:
>
> my $DEBUG = $mappings{'debug'};
> my $time_limit = $mappings{'TIME_LIMIT'};
> my $max_limit = $mappings{'MAX_LIMIT'};
>
> And in the main configuration file, call:
>
> PerlModule Apache::TimeOut
>
> In my Makefile.PL, I think I should do this:
>
> my @directives = (
>                        { name         => 'TimeOut',
>                          errmsg => 'an option (debug, TIME_LIMIT, MAX_LIMIT) and
> value',
>                          args_how => 'TAKE2',
>                          reg_override => 'OR_AUTHCFG'
>                        }
>                 );
>
> I know I've done a lot of talking, but can someone tell me if
> I've messed something up?
>
> Thanks,
> JJ    
>
> --
> J. J. Horner
> [EMAIL PROTECTED] http://www.knoxlug.org
> System has been up: 2 days.




       _ _ _ _           _    _ _ _ _ _
      /\_\_\_\_\        /\_\ /\_\_\_\_\_\
     /\/_/_/_/_/       /\/_/ \/_/_/_/_/_/  QUIDQUID LATINE DICTUM SIT,
    /\/_/__\/_/ __    /\/_/    /\/_/          PROFUNDUM VIDITUR
   /\/_/_/_/_/ /\_\  /\/_/    /\/_/
  /\/_/ \/_/  /\/_/_/\/_/    /\/_/         (Whatever is said in Latin
  \/_/  \/_/  \/_/_/_/_/     \/_/              appears profound)

  Rob Tanner
  McMinnville, Oregon
  [EMAIL PROTECTED]

Reply via email to