On Mon, May 22, 2000 at 11:24:10PM -0700, Perrin Harkins <[EMAIL PROTECTED]> wrote:
> I don't quite understand what you're trying to do, 

"compile normal perl code"

> but what you have here is a closure and it looks like you want a real
> global instead.

At leats in the example I sent in there is no sign of any closure.

> Some of your language makes it look like you may have some confusion
> between global and lexicals.

Indeed, I could have worded it better. Just replace global by "file-scope"
and it is correct, though. What I wanted to make clear is that the my
variable in question is global (= life during the program lifetime), since
it was declared at package scope.

> At any rate, "do" is nearly always a bad thing

Huh? Why is "do" a bad thing???? In any case, there is no shorter and
(IMHO) more consise way of writing these two lines without do.

> and the business about being parsed twice only applies to Apache's
> config file and <Perl> sections in it, not to your modules. - Perrin

I wasn't clear here. I use these modules in config sections. The problem
is that the modules indeed are parsed twice. I first didn't believe it,
but any modules I "use" in perl sections are indeed parsed twice by apache
(If I open a file and append something to it in a module I cna see this.
Simply printing doesn't suffice, as STDOUT is not available)

Here is an example perl section:

========================================================================================
PerlModule PApp::Apache # this pulls PApp in as well.

<Location /perl-status>
   SetHandler perl-script
   PerlHandler Apache::Status
</Location>

<Files *.cgi>
   Options +ExecCGI
   SetHandler perl-script
   PerlHandler Apache::Registry
</Files>

<Perl>
   search_path PApp "/root/src/Fluffball";
   configure PApp (
      cipherkey => "60feafc16b887e7fcfcf1814590ee576e908197c7d31a9fd13e25cb54f636b70",
      pappdb    => "DBI:mysql:papp",
      checkdeps => 1,
   );
</Perl>
========================================================================================

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       [EMAIL PROTECTED] |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |

Reply via email to