Re: A ghost in the machine?

Torsten Förtsch <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On Friday 15 January 2010 00:41:25 Tosh Cooey wrote:
> Well Gang, we solved the smaller @_ mystery but not the larger 
> "different behaviour under mod_perl" mystery.
> 
No, we have.

A registry script is wrapped into a subroutine. So your index.pl will look 
like:

  sub ... {
    package ...;
    use MyConfig;
    use ClientConf;
    use MyUser;
    my $vars = { config => &cfg };
    ...
  }

This function is called with $r as the one and only parameter. So @_=($r) at 
the time of calling &cfg. That means you is fact call &cfg($r).

Torsten
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.