You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Rob Tanner <rt...@onlinemac.com> on 2000/06/10 00:56:31 UTC

Re: Any tips or hints?

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" <jj...@bellsouth.net> 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
> jhorner@knoxlug.org 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
  rtanner@onlinemac.com

Re: Any tips or hints?

Posted by Robin Berjon <ro...@knowscape.com>.
At 19:23 11/06/2000 -0400, J. Horner wrote:
>Perhaps I've misread something.  I was trying to make my module,
>Apache::TimeOut, usable on CPAN.  I wrote this module to provide
>configurable timeouts for certain web pages.  I am just trying to
>find a way to put this is in the CPAN archive.  Any good links on
>making the Makefile.PL, the documentation, and the .tar.gz file
>needed to list this on CPAN?

There's a new man page being created:

http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-05/msg01095.html



-- robin b.
James Joyce -- an essentially private man who wished his total indifference
to public notice to be universally recognized. -- Tom Stoppard


Re: Any tips or hints?

Posted by "J. Horner" <jj...@bellsouth.net>.
Rob Tanner wrote:
> 
> 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.
> 

Perhaps I've misread something.  I was trying to make my module,
Apache::TimeOut, usable on CPAN.  I wrote this module to provide
configurable timeouts for certain web pages.  I am just trying to
find a way to put this is in the CPAN archive.  Any good links on
making the Makefile.PL, the documentation, and the .tar.gz file
needed to list this on CPAN?

Thanks,
JJ


-- 
J. J. Horner
jhorner@knoxlug.org http://www.knoxlug.org
System has been up: 4 days.