develooper Front page | perl.qa | Postings from April 2015

Re: new Stream Test::Simple question, XS requirement

Thread Previous | Thread Next
From:
bulk88
Date:
April 26, 2015 03:57
Subject:
Re: new Stream Test::Simple question, XS requirement
Message ID:
BLU437-SMTP101CA0D54F9446EAFEFBAD8DFEA0@phx.gbl
Chad Granum wrote:
> I have no objections to having OPTIONAL XS available to speed things up 
> for people who want it. However I will not accept making XS a 
> requirement. I thought that since Scalar::Util::weaken was in core that 
> there would be no issues using it in a core module.

Core includes XS modules. You relied on an XS module, see below.

> If using weaken 
> makes Test-Simple non-corable, then I will use a slightly alternate 
> design.

Current new Test::Simple is slightly slower than legacy, will your 
non-weaken solution make new Test::Simple twice as slow as legacy? 
Because of the rjbs post that supposedly (someone else should confirm 
this) minitest does not use Test::*, new Test::Simple can use all the XS 
it wants. Maybe you want to change the design rule and say XS is 
mandatory to run new Test::More, but also remember, legacy Test::Simple 
doesn't require XS. There are 2 levels of "requires XS", 1 is to say 
you must have a working C compiler to install new Test::Simple, the 
other level is to say, at some point in the past you or your predecessor 
must have had access to a C compiler to build the core XS modules. If 
your platform's perl doesn't have DynaLoader, or if your OS vendor/IT 
dept decided to only distribute XS-free core modules, then sorry, new 
Test::Simple is not supported on your system (must have working 
Scalar::Util).

To prove new Test::Simple requires XS, I ran.

---------------------------------------------------------
C:\perl521\srcnewb4opt>miniperl -IC:\sources\testmorenew\lib -Ilib 
-MTest::More
-e"0"
Can't load module List::Util, dynamic loading not available in this perl.
   (You may need to build a new perl executable which either supports
   dynamic loading or has the List::Util module statically linked into it.)
  at lib/Scalar/Util.pm line 11.
Compilation failed in require at lib/Scalar/Util.pm line 11.
Compilation failed in require at 
C:\sources\testmorenew\lib/Test/Stream/Util.pm line 5.
BEGIN failed--compilation aborted at 
C:\sources\testmorenew\lib/Test/Stream/Util.pm line 5.
Compilation failed in require at 
C:\sources\testmorenew\lib/Test/Stream.pm line 9.
BEGIN failed--compilation aborted at 
C:\sources\testmorenew\lib/Test/Stream.pm line 9.
Compilation failed in require at C:\sources\testmorenew\lib/Test/More.pm 
line 10.
BEGIN failed--compilation aborted at 
C:\sources\testmorenew\lib/Test/More.pm line 10.
Compilation failed in require.
BEGIN failed--compilation aborted.


C:\perl521\srcnewb4opt>
---------------------------------------------------------

Legacy doesn't requre XS

---------------------------------------------------------
C:\perl521\srcnewb4opt>miniperl -Ilib -MTest::More -e"0"

C:\perl521\srcnewb4opt>
---------------------------------------------------------

So what is your (exodist) design rule, atleast for now, on XS and new 
Test::Simple?

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About