On Fri, 13 Jul 2001, Doug MacEachern wrote:

> > - shouldn't PerlRequire be just an alias for PerlModule? since apparently
> > its implementation seem to be identical to PerlModule.
>
> PerlRequire puts quotes around the value, since PerlRequire is a file,
> whereas PerlModule is a bareword.

So is modperl_require_module() is used only for CORE::require()? If so

- do we need modperl_use_module() to implement CORE::use
- should it be based on modperl_require_module() and convert the bareword
  into a filename before calling  modperl_require_module() or implemented
  from scratch
  s|::|/|;
  s|$|.pm|;

> >  {
> >      MP_dSCFG(s);
> >      PerlInterpreter *perl;
> > -    int status;
> > -    char **argv;
> > +    int status, i;
> > +    char **argv, **entries;
> >      int argc;
> >  #ifndef USE_ITHREADS
> >      modperl_cleanup_data_t *cdata;
> > @@ -80,6 +80,14 @@
> >                                modperl_shutdown, apr_pool_cleanup_null);
> >  #endif
> >
> > +    {
> > +        dTHXa(perl);
> > +        entries = (char **)scfg->PerlModule->elts;
> > +        for(i = 0; i < scfg->PerlModule->nelts; i++)
> > +            if (modperl_require_module(aTHX_ entries[i], TRUE) == FALSE)
> > +                exit(1);
> > +    }
> > +
>
> this stuff should be in its own function, probably in
> modperl_config.c.  you're missing some braces and whitespace:
> for (...) {
>     if (...) {
>     }
> }

Sure, will fix. I thought I could actually take a benefit of using one
statement/no_braces_required C feature here :)

> > +    MP_TRACE_d(MP_FUNC, "%s\n", arg);
>
> > +    MP_TRACE_d(MP_FUNC, "%s\n", arg);
>
> should be more that "%s\n" here.

But you actually have only a single arg. Or are you talking about flagging
whether we are in parent process or vh scope? I've copied it from
MP_CMD_SRV_DECLARE(options) which traces only the options passed.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to