[Module-build-general] require thread-multi
Status: Beta
Brought to you by:
kwilliams
|
From: Jim C. <jc...@di...> - 2003-07-01 00:39:15
|
Folks,
while trying to install Hook::Scope on a non-threaded perl, I discovered
that it is unsupported on on-threaded builds.
now, Hook::Scope uses an old-style Makefile.PL, but Id much rather
rewrite it into a Build.PL than try to shoehorn a custom dependency check
into its Makefile.PL (tho if its obvious to you, please let me, or
ABERGMAN know)
Anyway, such a dependency is on perl itself, which in my case is already
used
requires => {
perl => '5.8.0',
B::Generate => 0,
optimizer => 0,
},
Is it possible/reasonable to add 2 dependencies on perl, something like
requires => {
perl => [ '5.8.0', qr/thread-multi/ ],
B::Generate => 0,
optimizer => 0,
},
I tried this, it bombs currently:
Invalid prerequisite condition 'ARRAY(0x8111eb4)' for perl at
/usr/local/lib/perl5/site_perl/5.8.0/Module/Build/Base.pm line 436.
This expression of a dependency on a threaded install is somewhat
problematic,
as its not depending upon a particular package, but on a component in @INC.
But a dependency on threads is no good, cuz threads is specifically
available
as a no-op under non-threaded builds.
ARRAY is also not kosher, so I tried following - also failed:
requires => {
perl => '5.8.0, thread-multi',
B::Generate => 0,
optimizer => 0,
}
This still has problem of implied check on @INC, but it fails before
that, on 5.8.0
Invalid prerequisite condition '5.8.0' for perl at
/usr/local/lib/perl5/site_perl/5.8.0/Module/Build/Base.pm line 436.
Lastly, I tried this - but it fails with same error as above
requires => {
perl => 'grep {/thread-multi/} @INC',
B::Generate => 0,
optimizer => 0,
},
So - what would be a good approach ?
what could evolve into an acceptable patch ?
please cc me, as im not currently on the mailing list.
tia,
-jimc
|