You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stas Bekman <st...@stason.org> on 2001/06/27 18:36:37 UTC

Re: startup

On Wed, 27 Jun 2001, Purcell, Scott wrote:

> Hello Stas,
> I think somehow my question got out of sync with the answer. My question
> was, if I do a use cgi qw(-compile: all) in my startup (which I have done),
> do I still need to put a use cgi in each of my .pl files? I have read
> through the docs, and the book, but as a rookie to mod-perl these kinds of
> questions are hard for me to get a handle on. I assume the answer is yes,
> but instead of actually reloading the module that it would check the cache
> and use that? Am I on the right track. Also, there is quite a bit of
> documentation out there, could you point me to the one that talks about
> this?

Scott, please keep the questions at the list, wheneven someone or I can
answer we will do it. You minimize your chances to get answered when you
try to do it in private.

As I said, the guide covers this question. Here is the direct URL:
http://perl.apache.org/guide/config.html#The_Confusion_with_use_in_the_

Here is a link to the notes in my previous reply to you:
http://perl.apache.org/guide/performance.html#Preloading_Perl_Modules_at_Serve


>
> I hope I am not offending you by asking,
> Sincerely
> Scott
>
> -----Original Message-----
> From: Stas Bekman [mailto:stas@stason.org]
> Sent: Wednesday, June 27, 2001 11:10 AM
> To: Purcell, Scott
> Cc: mod_perl list
> Subject: Re: Startup.pl File Q
>
>
> On Wed, 27 Jun 2001, Issac Goldstand wrote:
>
> > Actually, I believe that it helps to do a use cgi qw(-compile: all) as
> this
> > will pre-compile the entire module (which makes it go a bit faster for
> it's
> > first request).
>
> As Issac correctly said, but usually you don't want :all, but only the tag
> groups that you really need. Scott, please refer to the guide, it explain
> what, how and why.  Including memory measurement with different configs.
>
> >
> >    Issac
> >
> > ----- Original Message -----
> > From: "Purcell, Scott" <sp...@ltcgroup.com>
> > To: <mo...@apache.org>
> > Sent: Wednesday, June 27, 2001 17:29
> > Subject: Startup.pl File Q
> >
> >
> > > Mod_perl version: 1.25_01-dev
> > > Perl version:         5.6.1
> > > Apache Version:  1.3.20
> > > OS:                    NT
> > >
> > > I am in the apache book and I am doing some hacking. In my startup.pl
> > file,
> > > I put 'use CG qw(:standard); along with some other modules.
> > > Anyway, then I typed that little dittie below, and commented out the
> $use
> > > CGI (since I thought it would be loaded in the startup.pl file).
> > >
> > > It does not work. Are the items in the startup.pl file only used with
> > > handlers?
> > >
> > > Thanks
> > > Scott
> > >
> > >
> > >
> > > ### code below just for reference #####
> > >
> > > #! /usr/local/bin/perl
> > >
> > > #use CGI qw(:standard);
> > > use strict;
> > >
> > > my $name = param('name') || 'Anonymous';
> > >
> > > print header(),
> > > start_html(-title=>'Yo!',-bgcolor=>'blue'),
> > > h1("Hello $name"),
> > > p(
> > > "To change your name, enter it into the text field below and press",
> > >     em("change name.")
> > > ),
> > > start_form(),
> > > "Name: ",textfield(-name=>'name',-value=>'Anonymous'),
> > > submit(-value=>'Change Name'),
> > > end_form(),
> > > hr(),
> > > end_html();
> > >
> > > Scott Purcell
> > >
> >
>
>
>
> _____________________________________________________________________
> Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
> http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
> mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
> http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
>



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/