perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Foertsch <torsten.foert...@gmx.net>
Subject Re: Please help adding ModPerl::Interpreter
Date Thu, 25 Oct 2007 10:35:46 GMT
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

Mime
View raw message