On 04/26/2015 12:15 AM, Chad Granum wrote:
I am not sure it is entirely my decision. If it is entirely my decision
than this is it:
Must have a working scalar::util::weaken to use the new Test::Simple. The
Test-Simple dist itself will not require a c compiler to install, as in no
xs is included in the dist. A Test-Simple-XS dist may be created if desired
that will be used by Test-Simple if it is installed, but it will not be a
requirement. Up to rjbs and p5p as to of the xs components will  be part of
core.

However I want to know how the rest of perl-qa feels about this first. If
people are not bothered by using scalar::util then we have no problem. If
they are bothered by scalar::util being used then we need to look at
options.

Does anyone have a strong opinion about Test-Simple needing scalar::util?
On Apr 25, 2015 8:57 PM, "bulk88" <bul...@hotmail.com> wrote:


As I suggested in an earlier post in this thread, I think this is mainly a backwards-compatibility issue.

The new Test-Simple, like the old one, will be distributed primarily in two ways:

* As a stand-alone distribution on CPAN, in which case it should work with older versions of Perl 5 as far back as possible.

* As part of the Perl 5 core distribution, in which case it only has to work with the version with which it's distributed.

We've got the second case covered, so we only have to worry about the former. If the new Test-Simple is being installed against a Perl that already has Scalar::Util::weaken -- which is guaranteed by Perl 5.8.5 or later -- there is no problem. The version of Test-Simple distributed with Perl 5.20 was 1.001002 and had a minimum Perl version of 5.006. So for all practical purposes, the only production versions of Perl we have to worry about are those from 5.6.0 to 5.8.4.

IIRC, we had to face problems like this several times in the era before Scalar-List-Utils became part of the core distro and ... we solved them! I wasn't part of p5p at the time, so I don't recall the details, but I'll bet it's a SMOP and hence no obstacle to Test-Simple's ongoing development.

Thank you very much.
Jim Keenan


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?



Reply via email to