ModPerl::MM or ExtUtils::MakeMaker or what?
am 03.04.2008 10:19:31 von torsten.foertsch
Hi,
I am a bit confused about what MakeMaker is best to use with mp2 modules.
There is the good old ExtUtils::MakeMaker that is mentioned in
http://perl.apache.org/docs/general/testing/testing.html. How I got there I
don't remember but I have used in all my modules ModPerl::MM. Is that right?
Or should I rather port them to use the former?
I am asking because I have had FAIL reports from CPAN testers that don't
install ModPerl::MM. The way around these reports is using
BEGIN {
eval {
require ModPerl::MM;
require Apache::TestMM;
};
if( $@ ) {
warn $@;
exit 0;
}
Apache::TestMM->import( qw(test clean) );
}
instead of
use ModPerl::MM ();
use Apache::TestMM qw(test clean);
This way no Makefile is written and the automatic test suite is happy.
Torsten
Re: ModPerl::MM or ExtUtils::MakeMaker or what?
am 03.04.2008 17:51:32 von Geoffrey Young
Torsten Foertsch wrote:
> Hi,
>
> I am a bit confused about what MakeMaker is best to use with mp2 modules.
> There is the good old ExtUtils::MakeMaker that is mentioned in
> http://perl.apache.org/docs/general/testing/testing.html. How I got there I
> don't remember but I have used in all my modules ModPerl::MM. Is that right?
> Or should I rather port them to use the former?
ModPerl::MM is the way to go. I suspect you can get away with
ExtUtils::MakeMaker as log as you're not using XS, but I honestly can't
recall what additional magic ModPerl::MM adds. it could be substantial :)
>
> I am asking because I have had FAIL reports from CPAN testers that don't
> install ModPerl::MM. The way around these reports is using
>
> BEGIN {
> eval {
> require ModPerl::MM;
> require Apache::TestMM;
> };
> if( $@ ) {
> warn $@;
> exit 0;
> }
> Apache::TestMM->import( qw(test clean) );
> }
>
> instead of
>
> use ModPerl::MM ();
> use Apache::TestMM qw(test clean);
>
> This way no Makefile is written and the automatic test suite is happy.
yeah, that's the way you'll need to do it... if you care about those
reports :)
you can probably assume that if the user has ModPerl::MM that
Apache-Test is available.
--Geoff
Re: ModPerl::MM or ExtUtils::MakeMaker or what?
am 04.04.2008 08:40:18 von gozer
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigCFE558A9B1825419417358DD
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Geoffrey Young wrote:
>=20
> Torsten Foertsch wrote:
>> Hi,
>>
>> I am a bit confused about what MakeMaker is best to use with mp2 modul=
es.=20
>> There is the good old ExtUtils::MakeMaker that is mentioned in=20
>> http://perl.apache.org/docs/general/testing/testing.html. How I got th=
ere I=20
>> don't remember but I have used in all my modules ModPerl::MM. Is that =
right?=20
>> Or should I rather port them to use the former?
>=20
> ModPerl::MM is the way to go. I suspect you can get away with=20
> ExtUtils::MakeMaker as log as you're not using XS, but I honestly can't=
=20
> recall what additional magic ModPerl::MM adds. it could be substantial=
:)
Yes, unless you are using C/XS code that uses Apache/APR/mod_perl APIs, i=
t
doesn't matter. Under the hood, it basically makes sure to propagate the
right values thru to MakeMaker:
CCFLAGS
LIBS
INC
OPTIMIZE
LDDLFLAGS
TYPEMAPS
OTHERLDFLAGS
>> I am asking because I have had FAIL reports from CPAN testers that don=
't=20
>> install ModPerl::MM.=20
You mean people who install mod_perl 2 and *not* ModPerl::MM ?? Otherwise=
,
I would think breaking out on the presence of mod_perl2.pm is good enough=
, no?
>> The way around these reports is using
>>
>> BEGIN {
>> eval {
>> require ModPerl::MM;
>> require Apache::TestMM;
>> };
>> if( $@ ) {
>> warn $@;
>> exit 0;
>> }
>> Apache::TestMM->import( qw(test clean) );
>> }
>>
>> instead of
>>
>> use ModPerl::MM ();
>> use Apache::TestMM qw(test clean);
>>
>> This way no Makefile is written and the automatic test suite is happy.=
>=20
> yeah, that's the way you'll need to do it... if you care about those=20
> reports :)
>=20
> you can probably assume that if the user has ModPerl::MM that=20
> Apache-Test is available.
Wouldn't that be a bogus assumption? Better off to assume mod_perl2.pm me=
ans
ModPerl::MM is installed.
--=20
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
--------------enigCFE558A9B1825419417358DD
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH9c1SyzKhB4jDpaURAo8gAKCZHkhRAZ6cusi3kall/hRwRH0AngCg r0Ts
ljrBk19jGEfz9O8ogcsYH0k=
=Wv0N
-----END PGP SIGNATURE-----
--------------enigCFE558A9B1825419417358DD--
Re: ModPerl::MM or ExtUtils::MakeMaker or what?
am 04.04.2008 10:30:54 von imacat
--===[PGP/MIME_RFC2015]===47F5E732.0E13===
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
On Thu, 3 Apr 2008 10:19:31 +0200
Torsten Foertsch wrote:
> I am asking because I have had FAIL reports from CPAN testers that don't
> install ModPerl::MM. The way around these reports is using
> BEGIN {
> eval {
> require ModPerl::MM;
> require Apache::TestMM;
> };
> if( $@ ) {
> warn $@;
> exit 0;
> }
> Apache::TestMM->import( qw(test clean) );
> }
As a CPAN tester, I think this is correct.
--
Best regards,
imacat ^_*'
PGP Key: http://www.imacat.idv.tw/me/pgpkey.asc
<> News: http://www.wov.idv.tw/
Tavern IMACAT's: http://www.imacat.idv.tw/
TLUG List Manager: http://lists.linux.org.tw/cgi-bin/mailman/listinfo/tlug
--===[PGP/MIME_RFC2015]===47F5E732.0E13===
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
iD4DBQBH9ecyi9gubzC5S1wRAi5/AJ4moSVEQ6hBPy8dp3UuJNmLKHnERwCY w0EL
Q1kx0yRIZd+lw3Wzb5rx9w==
=hCDh
-----END PGP SIGNATURE-----
--===[PGP/MIME_RFC2015]===47F5E732.0E13===--