You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Torsten Foertsch <to...@gmx.net> on 2007/10/09 17:59:31 UTC

Please help adding ModPerl::Interpreter

Hi,

for testing purposes I need an interface to the modperl_interp_t. That means 
I'd like to check the current interp's refcnt and num_requests members from 
perl level.

So I thought of adding a ModPerl::Interpreter XS module. But after reading 
http://perl.apache.org/docs/2.0/devel/core/explained.html I am only more 
confused.

Why is it so complicated to add a new XS module? Is it really necessary to 
edit all these tables and maps? Further, somewhere is said that the source 
scanning is not yet stable. In fact I have tried it some time ago and got 
completely different results.

I know how to create such a module outside modperl but it would depend on 
modperl. But I need it to test modperl itself. Hence I cannot build the 
module outside modperl because I would not be able to install it without 
modperl.

So, if someone knows better than me please help. A patch that adds a framework 
for the new module to modperl so that I could simply fill in my stuff would 
be best.

An explanation what to would also be most appreciated.

Thanks,
Torsten

Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Wednesday 24 October 2007, Torsten Foertsch wrote:
> This one ...

Ups, forgot to add t/directive/perlcleanuphandler.t

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Thursday 18 October 2007, Philippe M. Chiasson wrote:
>> Any chance you can break the patch into multiple patches
> 
> This one needs the refcount based interpreter management to work. It moves the 
> registration of the PerlCleanupHandler callback to 
> modperl_hook_create_request.
> 
> It also fixes a problem that occurres if the only Perl handler in the request 
> cycle is the PerlCleanupHandler. Previously the cleanup callback was 
> registered in modperl_callback_run_handlers. To be called at least one other 
> perl handler must be installed in the request cycle. So, if there is no such 
> handler the cleanup callback is not registered and hence not called.

Committed revision 594609.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Thursday 18 October 2007, Philippe M. Chiasson wrote:
> Any chance you can break the patch into multiple patches

This one needs the refcount based interpreter management to work. It moves the 
registration of the PerlCleanupHandler callback to 
modperl_hook_create_request.

It also fixes a problem that occurres if the only Perl handler in the request 
cycle is the PerlCleanupHandler. Previously the cleanup callback was 
registered in modperl_callback_run_handlers. To be called at least one other 
perl handler must be installed in the request cycle. So, if there is no such 
handler the cleanup callback is not registered and hence not called.

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Thursday 18 October 2007, Philippe M. Chiasson wrote:
>> Any chance you can break the patch into multiple patches
> 
> This one removes the unused tipool_cfg from modperl_interp_pool_t.

Already applied to the trunk/ as r585724

------------------------------------------------------------------------
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Thursday 18 October 2007, Philippe M. Chiasson wrote:
> Any chance you can break the patch into multiple patches

This one removes the unused tipool_cfg from modperl_interp_pool_t.

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Monday 22 October 2007, Philippe M. Chiasson wrote:
>> And make modperl_trace always prefix log messages with modperl_tid_pid()?
> 
> That makes sense. I didn't know about modperl_pid_tid(). But the 
> implementation is not good.
> 
> 1) It requires a pool that is not always available
> 2) It introduces a memory leak if the pool is long living
> 
> So I have implemented it directly in modperl_trace.

Committed revision 594345.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Monday 22 October 2007, Philippe M. Chiasson wrote:
> And make modperl_trace always prefix log messages with modperl_tid_pid()?

That makes sense. I didn't know about modperl_pid_tid(). But the 
implementation is not good.

1) It requires a pool that is not always available
2) It introduces a memory leak if the pool is long living

So I have implemented it directly in modperl_trace.

On question, the old implementation reads:

...
    if (modperl_threaded_mpm()) {
        return apr_psprintf(p, "%lu"
#if APR_HAS_THREADS
                            "/%lu"
#endif /* APR_HAS_THREADS */
                            , (unsigned long)getpid()
#if APR_HAS_THREADS
                            , modperl_threads_started()
                            ? (unsigned long)apr_os_thread_current()
                            : 0
#endif /* APR_HAS_THREADS */
...

That suggests that it is possible to use a modperl built with a non-threaded 
perl with a threaded MPM. I think that can be ruled out.

BTW, modperl_trace adds a newline to the output. But almost all occurrences of 
MP_TRACE_x do the same. So, almost all trace lines appear with empty lines in 
between. Not that I want to patch that but why is it so?

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Thursday 18 October 2007, Philippe M. Chiasson wrote:
>> Any chance you can break the patch into multiple patches
> 
> This one adds the current pid to the output of modperl_trace.

Wouldn't a better all-around approach use a pid/tid combination for
threaded MPMs and fallback to pid only otherwise ?

modperl_tid_pid() does just that.

Why not clean up things like in modperl_mgv.c:

    MP_TRACE_h(MP_FUNC, "[%s] new anon handler",
        modperl_pid_tid(p));

And make modperl_trace always prefix log messages with modperl_tid_pid()?

------------------------------------------------------------------------
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Thursday 18 October 2007, Philippe M. Chiasson wrote:
> Any chance you can break the patch into multiple patches

This one adds the current pid to the output of modperl_trace.

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Wednesday 24 October 2007, Torsten Foertsch wrote:
> On Thursday 18 October 2007, Philippe M. Chiasson wrote:
> > Any chance you can break the patch into multiple patches
>
> This one ...

I forgot the changes in xs/maps and xs/tables.

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Thursday 18 October 2007, Philippe M. Chiasson wrote:
>> Any chance you can break the patch into multiple patches
> 
> This one makes PerlInterpScope more advisory. Using pnotes increment the 
> refcnt of the interp thus binding it to the lifetime of the pnotes. So, using 
> $c->pnotes binds the interp to the lifetime of the connection, $r->pnotes to 
> the request lifetime.
> 
> $[rc]->pnotes_kill() can be used to prematurely drop pnotes and thus remove 
> the binding.

Commited revision 594612.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Thursday 18 October 2007, Philippe M. Chiasson wrote:
> Any chance you can break the patch into multiple patches

This one makes PerlInterpScope more advisory. Using pnotes increment the 
refcnt of the interp thus binding it to the lifetime of the pnotes. So, using 
$c->pnotes binds the interp to the lifetime of the connection, $r->pnotes to 
the request lifetime.

$[rc]->pnotes_kill() can be used to prematurely drop pnotes and thus remove 
the binding.

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Thursday 18 October 2007, Philippe M. Chiasson wrote:
>> Any chance you can break the patch into multiple patches
> 
> This one registers the cleanup phase with a subpool to ensure it is run before 
> pnotes are destroyed. Subpools are destroyed first thing in 
> apr_pool_{clear,destroy}. Hence, a pool cleanup registered with a subpool is 
> always called before a cleanup registered with the main pool.

Nice and elegant, and removes a piece of annoying, special-case code.

Applied to trunk/ as r588156.

Little style nit (see http://perl.apache.org/docs/2.0/devel/core/coding_style.html
for the whole details.

We globally use 4 spece indents, _not_ the \t (tab) character.

------------------------------------------------------------------------
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Thursday 18 October 2007, Philippe M. Chiasson wrote:
> Any chance you can break the patch into multiple patches

This one registers the cleanup phase with a subpool to ensure it is run before 
pnotes are destroyed. Subpools are destroyed first thing in 
apr_pool_{clear,destroy}. Hence, a pool cleanup registered with a subpool is 
always called before a cleanup registered with the main pool.

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Thursday 18 October 2007, Philippe M. Chiasson wrote:
>> Any chance you can break the patch into multiple patches
> 
> This one implements the refcount based interpreter management. Is supposed to 
> be applied on top of the pnotes-refcount patch.
> 
> It implements basically the same functionality as the patch posted on Sep 25, 
> see http://www.gossamer-threads.com/lists/modperl/dev/94911#94911.

Committed revision 594601 with some tweaks.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Thursday 18 October 2007, Philippe M. Chiasson wrote:
> Any chance you can break the patch into multiple patches

This one implements the refcount based interpreter management. Is supposed to 
be applied on top of the pnotes-refcount patch.

It implements basically the same functionality as the patch posted on Sep 25, 
see http://www.gossamer-threads.com/lists/modperl/dev/94911#94911.

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Wed 14 Nov 2007, Philippe M. Chiasson wrote:
>>> I have noticed that you have also deleted some trailing newlines on
>>> MP_TRACEs. Most MP_TRACE_x invocations have trailing newlines. For me
>>> they are rather disturbing but I thought they were there on purpose. So,
>>> what is the right way to call MP_TRACE_x, with or without a trailing
>>> newline?
>> Without, IMO. And I was under the impression that one of your earlier
>> patches added a newline to MP_TRACE_x calls, so I just removed \n's where I
>> see them.
> 
> This patch removes trailing newlines from MP_TRACE_x calls.

Committed revision 607694.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Wed 14 Nov 2007, Philippe M. Chiasson wrote:
> > I have noticed that you have also deleted some trailing newlines on
> > MP_TRACEs. Most MP_TRACE_x invocations have trailing newlines. For me
> > they are rather disturbing but I thought they were there on purpose. So,
> > what is the right way to call MP_TRACE_x, with or without a trailing
> > newline?
>
> Without, IMO. And I was under the impression that one of your earlier
> patches added a newline to MP_TRACE_x calls, so I just removed \n's where I
> see them.

This patch removes trailing newlines from MP_TRACE_x calls.

Torsten

Re: [PATCH 4/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Mon 03 Dec 2007, Torsten Foertsch wrote:
>> 29.diff
>> expands tabs in C files

Committed revision 607692.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


[PATCH 4/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by Torsten Foertsch <to...@gmx.net>.
On Mon 03 Dec 2007, Torsten Foertsch wrote:
> 29.diff
> expands tabs in C files

[PATCH 9/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by Torsten Foertsch <to...@gmx.net>.
On Mon 03 Dec 2007, Torsten Foertsch wrote:
> 34.diff
> adds emacs local vars to ModPerl-Registry/t/*.t

Re: [PATCH 5.2/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Mon 03 Dec 2007, Torsten Foertsch wrote:
>> On Mon 03 Dec 2007, Torsten Foertsch wrote:
>>> 30.diff
>>> expands tabs in *.p[lm]
>>> This patch is too big for the 100000 byte limit of the mailing list and
>>> will be sent in 2 parts.
>> Part 1

> Part 2

Committed revision 607695.
Committed revision 607697.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


[PATCH 5.2/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by Torsten Foertsch <to...@gmx.net>.
On Mon 03 Dec 2007, Torsten Foertsch wrote:
> On Mon 03 Dec 2007, Torsten Foertsch wrote:
> > 30.diff
> > expands tabs in *.p[lm]
> > This patch is too big for the 100000 byte limit of the mailing list and
> > will be sent in 2 parts.
>
> Part 1

Part 2

[PATCH 5.1/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by Torsten Foertsch <to...@gmx.net>.
On Mon 03 Dec 2007, Torsten Foertsch wrote:
> 30.diff
> expands tabs in *.p[lm]
> This patch is too big for the 100000 byte limit of the mailing list and
> will be sent in 2 parts.

Part 1

Re: [PATCH 2/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by "Philippe M. Chiasson" <go...@apache.org>.
Torsten Foertsch wrote:
> On Mon 03 Dec 2007, Torsten Foertsch wrote:
>> 27.diff
>> deletes trailing spaces and trailing empty lines from C files

Committed revision 607690.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


[PATCH 2/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by Torsten Foertsch <to...@gmx.net>.
On Mon 03 Dec 2007, Torsten Foertsch wrote:
> 27.diff
> deletes trailing spaces and trailing empty lines from C files

[PATCH 3/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by Torsten Foertsch <to...@gmx.net>.
On Mon 03 Dec 2007, Torsten Foertsch wrote:
> 28.diff
> adds emacs local vars to C files

Re: [PATCH 8/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Mon 03 Dec 2007, Torsten Foertsch wrote:
>> 33.diff
>> expands tabs in ModPerl-Registry/t/*.t

Committed revision 607693.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


[PATCH 8/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by Torsten Foertsch <to...@gmx.net>.
On Mon 03 Dec 2007, Torsten Foertsch wrote:
> 33.diff
> expands tabs in ModPerl-Registry/t/*.t

[PATCH 7/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by Torsten Foertsch <to...@gmx.net>.
On Mon 03 Dec 2007, Torsten Foertsch wrote:
> 32.diff
> does the same to t/.../*.t

[PATCH 6.2/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by Torsten Foertsch <to...@gmx.net>.
On Mon 03 Dec 2007, Torsten Foertsch wrote:
> On Mon 03 Dec 2007, Torsten Foertsch wrote:
> > 31.diff
> > adds emacs local vars to *.p[lm]
> > In perl files this is done in the first line or the line after the
> > shebang line. Thus the __DATA__ section is not touched.
> > This patch is too big for the 100000 byte limit of the mailing list and
> > will be sent in 2 parts.
>
> Part 1

Part 2

[PATCH 6.1/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by Torsten Foertsch <to...@gmx.net>.
On Mon 03 Dec 2007, Torsten Foertsch wrote:
> 31.diff
> adds emacs local vars to *.p[lm]
> In perl files this is done in the first line or the line after the shebang
> line. Thus the __DATA__ section is not touched.
> This patch is too big for the 100000 byte limit of the mailing list and
> will be sent in 2 parts.

Part 1

[PATCH 1/9] cleaning up trailing empty lines, expanding tabs and adding emacs local vars

Posted by Torsten Foertsch <to...@gmx.net>.
On Wed 14 Nov 2007, Philippe M. Chiasson wrote:
> >> /*
> >>  * Local Variables:
> >>  * c-basic-offset: 4
> >>  * indent-tabs-mode: nil
> >>  * End:
> >>  */
> >>
> >> and this to Perl-files:
> >>
> >> # Local Variables: #
> >> # mode: cperl #
> >> # cperl-indent-level: 4 #
> >> # indent-tabs-mode: nil #
> >> # End: #
> >
> > Can I take it as a "not at all" that you have left these comments in the
> > code?
>
> Yes, don't mind at all.

This is the first of set of patches that clean trailing empty lines in C files 
and trailing spaces from lines, expand tabs in C and Perl files and add emacs 
local variables to C and Perl files.

26.diff
deletes existing emacs local vars from modperl_module.c and modperl_interp.c

27.diff
deletes trailing spaces and trailing empty lines from C files

28.diff
adds emacs local vars to C files

29.diff
expands tabs in C files

30.diff
expands tabs in *.p[lm]
This patch is too big for the 100000 byte limit of the mailing list and will 
be sent in 2 parts.

31.diff
adds emacs local vars to *.p[lm]
In perl files this is done in the first line or the line after the shebang 
line. Thus the __DATA__ section is not touched.
This patch is too big for the 100000 byte limit of the mailing list and will 
be sent in 2 parts.

32.diff
does the same to t/.../*.t

33.diff
expands tabs in ModPerl-Registry/t/*.t

34.diff
adds emacs local vars to ModPerl-Registry/t/*.t

The diffs are from my local svn that was almost in sync with the threading 
branch except of t/response/TestPerl/ithreads3.pm and t/perl/ithreads3.t that 
do not exist yet in the threading branch.

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> Hi Philippe,
> 
> I am glad to see that all my patches are now applied to the threading branch. 
> The tweaks you have mentioned are only related to tab-based indentation, 
> right?

That's the nice thing about a hackathon ;-)

Yup, mostly just juggling whitespace around.

> I have noticed that you have also deleted some trailing newlines on MP_TRACEs. 
> Most MP_TRACE_x invocations have trailing newlines. For me they are rather 
> disturbing but I thought they were there on purpose. So, what is the right
> way to call MP_TRACE_x, with or without a trailing newline?

Without, IMO. And I was under the impression that one of your earlier patches
added a newline to MP_TRACE_x calls, so I just removed \n's where I see them.

> How about these 2 questions?
> 
> On Thu 25 Oct 2007, Torsten Foertsch wrote:
>> On Thursday 25 October 2007, Philippe M. Chiasson wrote:
>>> undef $r->pnotes
>> I have never implemented an lvalue function in XS. But is that possible?
>> AFAIK an lvalue function is called without the new value as parameter. So
>> how can I distinguish "undef $r->pnotes" from "$r->pnotes->{key}"
> 
>> On Thursday 25 October 2007, Philippe M. Chiasson wrote:
>>> We globally use 4 spece indents, _not_ the \t (tab) character.
> [...]
>> Would you mind if I append an appropriate emacs postscript to the files? So, 
>> a normal emacs user would avoid these errors.
>>
>> Something like this to C-files:
>>
>> /*
>>  * Local Variables:
>>  * c-basic-offset: 4
>>  * indent-tabs-mode: nil
>>  * End:
>>  */
>>
>> and this to Perl-files:
>>
>> # Local Variables: #
>> # mode: cperl #
>> # cperl-indent-level: 4 #
>> # indent-tabs-mode: nil #
>> # End: #
> 
> Can I take it as a "not at all" that you have left these comments in the code?

Yes, don't mind at all.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
Hi Philippe,

I am glad to see that all my patches are now applied to the threading branch. 
The tweaks you have mentioned are only related to tab-based indentation, 
right?

I have noticed that you have also deleted some trailing newlines on MP_TRACEs. 
Most MP_TRACE_x invocations have trailing newlines. For me they are rather 
disturbing but I thought they were there on purpose. So, what is the right
way to call MP_TRACE_x, with or without a trailing newline?

How about these 2 questions?

On Thu 25 Oct 2007, Torsten Foertsch wrote:
> On Thursday 25 October 2007, Philippe M. Chiasson wrote:
> > undef $r->pnotes
>
> I have never implemented an lvalue function in XS. But is that possible?
> AFAIK an lvalue function is called without the new value as parameter. So
> how can I distinguish "undef $r->pnotes" from "$r->pnotes->{key}"

> On Thursday 25 October 2007, Philippe M. Chiasson wrote:
> > We globally use 4 spece indents, _not_ the \t (tab) character.
>
[...]
> Would you mind if I append an appropriate emacs postscript to the files? So, 
> a normal emacs user would avoid these errors.
>
> Something like this to C-files:
>
> /*
>  * Local Variables:
>  * c-basic-offset: 4
>  * indent-tabs-mode: nil
>  * End:
>  */
>
> and this to Perl-files:
>
> # Local Variables: #
> # mode: cperl #
> # cperl-indent-level: 4 #
> # indent-tabs-mode: nil #
> # End: #

Can I take it as a "not at all" that you have left these comments in the code?

Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Thursday 25 October 2007, Philippe M. Chiasson wrote:
> > It was named after apr_pool_cleanup_kill(). If you don't like it then
> > what do you prefer _destroy or _reset? To me it's all the same.
>
> In that case, yes, pnotes_kill() probably is a bit more consistent.
>
> Of course, after thinking about it, the more Perl-ish thing to do would
> be to make this work:
>
> undef $r->pnotes

I have never implemented an lvalue function in XS. But is that possible? AFAIK 
an lvalue function is called without the new value as parameter. So how can I 
distinguish "undef $r->pnotes" from "$r->pnotes->{key}"

On Thursday 25 October 2007, Philippe M. Chiasson wrote:
> We globally use 4 spece indents, _not_ the \t (tab) character.

Are you sure? There is quite a number of files in a freshly checked out MP2 
that contain tabs and that where never touched by me:

$ grep -rl '       ' . | grep -v -e '\.svn' -e '\.\(dia\|gif\|png\|jpe\?g\)$'
./build/make_rpm_spec
./build/make_etags
./build/win32_fetch_apxs
./patches/c-scan.pat
./patches/link-hack.pat
./Makefile.PL
./t/modperl/pnotes2.t
./t/hooks/TestHooks/authz.pm
./t/response/TestDirective/perlloadmodule.pm
./t/response/TestPerl/ithreads.pm
./t/response/TestModperl/pnotes2.pm
./t/lib/TestAPRlib/finfo.pm
./Apache-Test/Makefile.PL
./Apache-Test/lib/Apache/TestMM.pm
./Apache-Test/lib/Apache/TestHarnessPHP.pm
./Apache-Test/lib/Apache/TestHarness.pm
./Apache-Test/lib/Apache/TestConfigC.pm
./Apache-Test/lib/Apache/TestConfigPerl.pm
./Apache-Test/lib/Apache/TestSSLCA.pm
./docs/devel/core/explained.pod
./docs/devel/performance/speed_matters.pod
./docs/api/Apache2/RequestUtil.pod
./docs/os/win32/mpinstall
./docs/user/handlers/http.pod
./docs/user/config/custom.pod
./docs/user/porting/code/apache_mp3_7.diff
./docs/user/porting/code/apache_mp3_2.diff
./docs/user/porting/code/apache_mp3_9.diff
./ModPerl-Registry/MANIFEST
./src/modules/perl/modperl_util.c
./src/modules/perl/modperl_svptr_table.c
./src/modules/perl/modperl_io.c
./lib/ModPerl/Manifest.pm
./lib/ModPerl/Code.pm
./lib/ModPerl/CScan.pm
./lib/ModPerl/WrapXS.pm
./lib/Apache2/Build.pm
./xs/Apache2/Directive/Apache2__Directive.h
./xs/Apache2/RequestRec/Apache2__RequestRec.h
./xs/typemap
./xs/maps/apache2_types.map
./xs/APR/aprext/Makefile.PL
./xs/APR/Socket/APR__Socket.h

For example src/modules/perl/modperl_io.c contains tabs in 
modperl_io_handle_tied().

But no problem. I can make a patch for that over the weekend. Would you mind 
if I append an appropriate emacs postscript to the files? So, a normal emacs 
user would avoid these errors.

Something like this to C-files:

/*
 * Local Variables:
 * c-basic-offset: 4
 * indent-tabs-mode: nil
 * End:
 */

and this to Perl-files:

# Local Variables: #
# mode: cperl #
# cperl-indent-level: 4 #
# indent-tabs-mode: nil #
# End: #

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Thursday 18 October 2007, Philippe M. Chiasson wrote:
>>> The patch contains all my findings so far including the pnotes refcount
>>> problem. Pnotes now lock the interpreter like pools do.
>> Any chance you can break the patch into multiple patches, one for each
>> feature/fix? Ideally with an accompanying entry in Changes ? It'll be
>> simpler to merge these one at a time back to the trunk/
> 
> Is the test suite expected to succeed after each patch?

In general, yes, that's the idea.

 I can think of a few
> minor patches like pnotes, cleanuphandler, logging the pid with modperl_trace 
> plus one big chunk with the basic interpreter management. Otherwise it 
> doesn't make sense for me.

The current stream of patches is piling up (my bad), but they are much
easier to digest now (your good).

>>> There is a new ${r|c}->pnotes_kill function that can be used to
>>> prematurely delete pnotes.
>> Not sure about kill, how aobut:
>>
>> ->pnotes_reset() ?
>> ->pnotes_destroy() ?
> 
> It was named after apr_pool_cleanup_kill(). If you don't like it then what do 
> you prefer _destroy or _reset? To me it's all the same.

In that case, yes, pnotes_kill() probably is a bit more consistent.

Of course, after thinking about it, the more Perl-ish thing to do would
be to make this work:

undef $r->pnotes

Right now, you get a very nice error if you try that:

 "Can't modify non-lvalue subroutine call"

Oh, well ;-)

------------------------------------------------------------------------
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Thursday 18 October 2007, Philippe M. Chiasson wrote:
> > The patch contains all my findings so far including the pnotes refcount
> > problem. Pnotes now lock the interpreter like pools do.
>
> Any chance you can break the patch into multiple patches, one for each
> feature/fix? Ideally with an accompanying entry in Changes ? It'll be
> simpler to merge these one at a time back to the trunk/

Is the test suite expected to succeed after each patch? I can think of a few 
minor patches like pnotes, cleanuphandler, logging the pid with modperl_trace 
plus one big chunk with the basic interpreter management. Otherwise it 
doesn't make sense for me.

> > There is a new ${r|c}->pnotes_kill function that can be used to
> > prematurely delete pnotes.
>
> Not sure about kill, how aobut:
>
> ->pnotes_reset() ?
> ->pnotes_destroy() ?

It was named after apr_pool_cleanup_kill(). If you don't like it then what do 
you prefer _destroy or _reset? To me it's all the same.

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> Hi Philippe,
> 
> On Thu 25 Oct 2007, Torsten Foertsch wrote:
>> On Thursday 18 October 2007, Philippe M. Chiasson wrote:
>>> Any chance you can break the patch into multiple patches
>> This is the last one of this series of patches. It simply adds the test
>> perl/ithreads3.
>>
>> Please apply all these patches in the given order to the threading branch.
>>
>> The result compiles passes the test suite cleanly on my linux system with
>> apache 2.2.6/perl 5.8.8
> 
> Is there a reason why this patch didn't make it to the threading branch?

Apologies, it had been sitting in a working copy I had managed to misplace.

Committed revision 607681.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
Hi Philippe,

On Thu 25 Oct 2007, Torsten Foertsch wrote:
> On Thursday 18 October 2007, Philippe M. Chiasson wrote:
> > Any chance you can break the patch into multiple patches
>
> This is the last one of this series of patches. It simply adds the test
> perl/ithreads3.
>
> Please apply all these patches in the given order to the threading branch.
>
> The result compiles passes the test suite cleanly on my linux system with
> apache 2.2.6/perl 5.8.8

Is there a reason why this patch didn't make it to the threading branch?

Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Thursday 18 October 2007, Philippe M. Chiasson wrote:
> Any chance you can break the patch into multiple patches

This is the last one of this series of patches. It simply adds the test 
perl/ithreads3.

Please apply all these patches in the given order to the threading branch.

The result compiles passes the test suite cleanly on my linux system with 
apache 2.2.6/perl 5.8.8

Thanks,
Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Thursday 18 October 2007, Philippe M. Chiasson wrote:
>> Any chance you can break the patch into multiple patches
> 
> This one adds ModPerl::InterpPool, ModPerl::TiPool and ModPerl::TiPoolConfig, 
> changes ModPerl::Interpreter a bit and provides some basic testing.

Committed revision 594347.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Thursday 18 October 2007, Philippe M. Chiasson wrote:
> Any chance you can break the patch into multiple patches

This one adds ModPerl::InterpPool, ModPerl::TiPool and ModPerl::TiPoolConfig, 
changes ModPerl::Interpreter a bit and provides some basic testing.

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Thursday 18 October 2007, Philippe M. Chiasson wrote:
>> Any chance you can break the patch into multiple patches
> 
> This one is supposed to be applied after the pid-tid patch to the threading 
> branch. It adds the last pnotes refcount fix.

It's already been applied to the trunk/ as r584380.

------------------------------------------------------------------------
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Thursday 18 October 2007, Philippe M. Chiasson wrote:
> Any chance you can break the patch into multiple patches

This one is supposed to be applied after the pid-tid patch to the threading 
branch. It adds the last pnotes refcount fix.

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Saturday 13 October 2007 08:31, Philippe M. Chiasson wrote:
>> In the meantime, I've created a threading branch here:
>>
>> http://svn.apache.org/repos/asf/perl/modperl/branches/threading
>>
>> And I've applied this change (rev 584377) as the first one in hopefully
>> many more of your patches. Only change is that I added minimal tests.
>>
>> Note, this patch/test doesn't behave correctly with a non-threaded Apache.
> 
> Thanks!

No problems! While you are at it, why don't you submit a patch for:

http://perl.apache.org/about/contributors/people.html

Source here:

http//svn.apache.org/repos/asf/perl/modperl/docs/trunk/src/about/contributors/

> Please apply the enclosed x.patch to the threading branch. I have tested it 
> with perl 5.8.8 (with threads), apache 2.2.6 (worker and prefork) on linux.
> 
> I think it needs some polishing to work with a perl without ithreads.

It certainly needs some #ifdef foo to be friendly to non-ithreads perls

> The patch contains all my findings so far including the pnotes refcount 
> problem. Pnotes now lock the interpreter like pools do.

Any chance you can break the patch into multiple patches, one for each
feature/fix? Ideally with an accompanying entry in Changes ? It'll be simpler
to merge these one at a time back to the trunk/

> There is a new ${r|c}->pnotes_kill function that can be used to prematurely 
> delete pnotes.

Not sure about kill, how aobut:

->pnotes_reset() ?
->pnotes_destroy() ?

> It is useful if you want to use pnotes say from trans to fixup 
> and thus bind the interp to the request but remove that binding before 
> response. So, PerlInterpScope is advisory now.
> 
> Also new interfaces incl. tests (but without docs) for ModPerl::Interpreter, 
> ModPerl::InterpPool, ModPerl::TiPool and ModPerl::TiPoolConfig are included.

Cool, will need to have a look at all that.

> The PUTBACK flag for interpreters is removed since it is not used anymore.

Good riddance.

> The attached xx patch deletes an unused structure member from 
> modperl_interp_pool_t.

Comitted on the trunk/ as revision 585724.

------------------------------------------------------------------------
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Saturday 13 October 2007 08:31, Philippe M. Chiasson wrote:
> In the meantime, I've created a threading branch here:
>
> http://svn.apache.org/repos/asf/perl/modperl/branches/threading
>
> And I've applied this change (rev 584377) as the first one in hopefully
> many more of your patches. Only change is that I added minimal tests.
>
> Note, this patch/test doesn't behave correctly with a non-threaded Apache.

Thanks!

Please apply the enclosed x.patch to the threading branch. I have tested it 
with perl 5.8.8 (with threads), apache 2.2.6 (worker and prefork) on linux.

I think it needs some polishing to work with a perl without ithreads.

The patch contains all my findings so far including the pnotes refcount 
problem. Pnotes now lock the interpreter like pools do.

There is a new ${r|c}->pnotes_kill function that can be used to prematurely 
delete pnotes. It is useful if you want to use pnotes say from trans to fixup 
and thus bind the interp to the request but remove that binding before 
response. So, PerlInterpScope is advisory now.

Also new interfaces incl. tests (but without docs) for ModPerl::Interpreter, 
ModPerl::InterpPool, ModPerl::TiPool and ModPerl::TiPoolConfig are included.

The PUTBACK flag for interpreters is removed since it is not used anymore.

The attached xx patch deletes an unused structure member from 
modperl_interp_pool_t.

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> On Wednesday 10 October 2007 21:20, Philippe M. Chiasson wrote:
>> The only question I have is wherever it's necessary to also expose the
>> following 2 items:
>>
>> modperl_interp_pool_t * | IV
>> PerlInterpreter *       | IV
>>
>> Especially in the current patch, what you get out will pretty much
>> be a useless blessed scalar you can't do anything with.
> 
> Without these 2 lines no accessor methods would be created because the wrapxs 
> process obviously doesn't know how to convert it. In my first version I had 
> declared mip and perl as void* in 
> xs/tables/current/Apache2/StructureTable.pm. This way I also got these 
> members compiled in. But then I suspected that a source scan would never 
> generate that. Am I right?

Yes, absolutely correct!

> BTW, I forgot to mention, the patch creates a new map: 
> xs/maps/modperl_structures.map. Is that OK?

That's more than okay, that was the correct thing to do.

>> Apart that, looks great. At this point, I'd be happy to see it go in,
>> without documentation even, but at least with a minimal set of tests,
>> something like:
>>
>> my $int = ModPerl::Interpreter->current;
>> ok($int);
>> is($int, 'ModPerl::Intereter');
>>
>> ok($int->mip);
>> ok($int->refcnt);
>> [...]
>>
>> To at least cover normal usage cases.
> 
> Of course.

In the meantime, I've created a threading branch here:

http://svn.apache.org/repos/asf/perl/modperl/branches/threading

And I've applied this change (rev 584377) as the first one in hopefully many more of
your patches. Only change is that I added minimal tests.

Note, this patch/test doesn't behave correctly with a non-threaded Apache.

> I need this module mainly for testing the interpreter management. The pair 
> ($$interp, $interp->num_requests) can be used as unique identifier for one 
> particular usage (the time between interp_select and interp_unselect) of that 
> interpreter.
> 
> refcnt is used to check for example if creating pnotes would lock the interp.
> 
> mip and perl are currently not used. They can be dropped if you think that 
> would be better

It's not much work to include them, so might as well keep them in.

> I am aware that if later on someone decides that a perl 
> interface to the mip structure would be good he has to change the API.

It's a change that would add to the existing API, so I wouldn't worry about
that case.

> But 
> that can be documented. On the other hand mip may be a useful tool to check 
> if a vhost with +Parent has really got a separate mip. But then an interface 
> to the mip->tipool might be useful to check how much interpreters are in use 
> at a certain point in time. Maybe I should provide a perl interface to that 
> too.

Maybe, yes. At some point I remember thinking that it would have simplified
things to just expose Perl interpreters to Perl, and do interpreter managment
in perl, but that's for another time ;-)

------------------------------------------------------------------------
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
On Wednesday 10 October 2007 21:20, Philippe M. Chiasson wrote:
> The only question I have is wherever it's necessary to also expose the
> following 2 items:
>
> modperl_interp_pool_t * | IV
> PerlInterpreter *       | IV
>
> Especially in the current patch, what you get out will pretty much
> be a useless blessed scalar you can't do anything with.

Without these 2 lines no accessor methods would be created because the wrapxs 
process obviously doesn't know how to convert it. In my first version I had 
declared mip and perl as void* in 
xs/tables/current/Apache2/StructureTable.pm. This way I also got these 
members compiled in. But then I suspected that a source scan would never 
generate that. Am I right?

BTW, I forgot to mention, the patch creates a new map: 
xs/maps/modperl_structures.map. Is that OK?

> Apart that, looks great. At this point, I'd be happy to see it go in,
> without documentation even, but at least with a minimal set of tests,
> something like:
>
> my $int = ModPerl::Interpreter->current;
> ok($int);
> is($int, 'ModPerl::Intereter');
>
> ok($int->mip);
> ok($int->refcnt);
> [...]
>
> To at least cover normal usage cases.

Of course.

I need this module mainly for testing the interpreter management. The pair 
($$interp, $interp->num_requests) can be used as unique identifier for one 
particular usage (the time between interp_select and interp_unselect) of that 
interpreter.

refcnt is used to check for example if creating pnotes would lock the interp.

mip and perl are currently not used. They can be dropped if you think that 
would be better. I am aware that if later on someone decides that a perl 
interface to the mip structure would be good he has to change the API. But 
that can be documented. On the other hand mip may be a useful tool to check 
if a vhost with +Parent has really got a separate mip. But then an interface 
to the mip->tipool might be useful to check how much interpreters are in use 
at a certain point in time. Maybe I should provide a perl interface to that 
too.

Torsten

Re: Please help adding ModPerl::Interpreter

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Torsten Foertsch wrote:
> Hi Geoff,
> 
> On Tuesday 09 October 2007 19:19, Geoffrey Young wrote:
>> if you're really confused, see the commits when I added Apache::MPM
>>
>>   http://marc.info/?l=apache-modperl-cvs&m=106978727408877&w=2
>>   http://marc.info/?l=apache-modperl-cvs&m=106978912311523&w=2
>>
>> the bulk of the main commit consists of the tests, but the interesting
>> changes are at the bottom.  if you just follow that pattern you should
>> be able to add the module of your choice.
> 
> I think I did it. Please have a look at the attached patch to see if it is all 
> that is needed to be done.

it looks ok.  the proof is in the tests, of course :)

> 
> The patch is a bit edited to suppress other changes in xs/. So I don't think 
> it would apply to trunk without warnings.

I don't understand that.  what other changes in xs/?  if you mean
missing directories, etc, you can use utils/getdiff.pl to generate a
reasonable diff that adds them.

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Please help adding ModPerl::Interpreter

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Torsten Foertsch wrote:
> Hi Geoff,
> 
> On Tuesday 09 October 2007 19:19, Geoffrey Young wrote:
>> if you're really confused, see the commits when I added Apache::MPM
>>
>>   http://marc.info/?l=apache-modperl-cvs&m=106978727408877&w=2
>>   http://marc.info/?l=apache-modperl-cvs&m=106978912311523&w=2
>>
>> the bulk of the main commit consists of the tests, but the interesting
>> changes are at the bottom.  if you just follow that pattern you should
>> be able to add the module of your choice.
> 
> I think I did it. Please have a look at the attached patch to see if it is all 
> that is needed to be done.

It looks pretty good, awesome!

> The patch is a bit edited to suppress other changes in xs/. So I don't think 
> it would apply to trunk without warnings.

It did apply clean for me.

The only question I have is wherever it's necessary to also expose the
following 2 items:

modperl_interp_pool_t * | IV
PerlInterpreter *       | IV

Especially in the current patch, what you get out will pretty much
be a useless blessed scalar you can't do anything with.

Apart that, looks great. At this point, I'd be happy to see it go in,
without documentation even, but at least with a minimal set of tests,
something like:

my $int = ModPerl::Interpreter->current;
ok($int);
is($int, 'ModPerl::Intereter');

ok($int->mip);
ok($int->refcnt);
[...]

To at least cover normal usage cases.

Good work !
------------------------------------------------------------------------
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Please help adding ModPerl::Interpreter

Posted by Torsten Foertsch <to...@gmx.net>.
Hi Geoff,

On Tuesday 09 October 2007 19:19, Geoffrey Young wrote:
> if you're really confused, see the commits when I added Apache::MPM
>
>   http://marc.info/?l=apache-modperl-cvs&m=106978727408877&w=2
>   http://marc.info/?l=apache-modperl-cvs&m=106978912311523&w=2
>
> the bulk of the main commit consists of the tests, but the interesting
> changes are at the bottom.  if you just follow that pattern you should
> be able to add the module of your choice.

I think I did it. Please have a look at the attached patch to see if it is all 
that is needed to be done.

The patch is a bit edited to suppress other changes in xs/. So I don't think 
it would apply to trunk without warnings.

Thanks,
Torsten

Re: Please help adding ModPerl::Interpreter

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Torsten Foertsch wrote:
> Hi,
> 
> for testing purposes I need an interface to the modperl_interp_t. That means 
> I'd like to check the current interp's refcnt and num_requests members from 
> perl level.
> 
> So I thought of adding a ModPerl::Interpreter XS module. But after reading 
> http://perl.apache.org/docs/2.0/devel/core/explained.html I am only more 
> confused.
> 
> Why is it so complicated to add a new XS module? Is it really necessary to 
> edit all these tables and maps? 

yeah :)

if you're really confused, see the commits when I added Apache::MPM

  http://marc.info/?l=apache-modperl-cvs&m=106978727408877&w=2
  http://marc.info/?l=apache-modperl-cvs&m=106978912311523&w=2

the bulk of the main commit consists of the tests, but the interesting
changes are at the bottom.  if you just follow that pattern you should
be able to add the module of your choice.

> Further, somewhere is said that the source 
> scanning is not yet stable. In fact I have tried it some time ago and got 
> completely different results.

yeah.  IIRC we were leaving it to doug and his hacked version of C::Scan
to generate the official scan, with the rest of us modifying it as you
see in the commits.

> 
> I know how to create such a module outside modperl but it would depend on 
> modperl. But I need it to test modperl itself. Hence I cannot build the 
> module outside modperl because I would not be able to install it without 
> modperl.
> 
> So, if someone knows better than me please help. A patch that adds a framework 
> for the new module to modperl so that I could simply fill in my stuff would 
> be best.
> 
> An explanation what to would also be most appreciated.

HTH

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org