develooper Front page | perl.perl5.porters | Postings from July 2013

Re: [perl #118537] Add non-XS extensions to known_extensions

Thread Previous | Thread Next
Nicholas Clark
July 2, 2013 13:14
Re: [perl #118537] Add non-XS extensions to known_extensions
Message ID:
I've patched Configure (and related files) to do this.

commit f7b3892b9e45c6994685c9a625d3ea2b52642167
Author: Nicholas Clark <>
Date:   Fri Jun 14 16:56:28 2013 +0200

    Add non-XS extensions to known_extensions.
    Previously "known_extensions" was misnamed, as it only contained known XS
    extensions. suggests that there are only 10 mentions of it
    outside the core, and none of them rely on this existing behaviour.
    Update the descriptions of extensions, known_extensions and nonxs_ext in
    These changes need replicating into

On Fri, Jun 21, 2013 at 05:11:01PM -0400, Andy Dougherty wrote:
> On Wed, Jun 19, 2013 at 02:25:32AM -0700, Nicholas Clark wrote:

> > I think that we should change Configure so that known_extensions includes
> > non-XS extensions. Currently, not having the non-XS modules in
> > known_extensions means that unlike XS modules, you can't skip building any
> > non-XS module, as t/TEST and t/harness will always run their tests (which
> > will fail), because the extension-test-skip logic uses known_extensions.
> > 
> > This means that
> > 
> > 1) you can't elect not to build to-be-evicted modules
> > 2) we can't put any platform-specific modules in ext (eg VMS::Filespec)

I haven't done either of these. I will move VMS::Filespec.
I'm not proposing to do (1) myself.

> Broadly speaking, I think it should be safe to change it to whatever works.  
> I think t/TEST and t/harness are wrong.  Their extension-test-skip logic
> should just use $extensions.  Nothing running after Configure should use
> $known_extensions.  It was not intended to be useful for anything after
> Configure time, though the documentation isn't explicit about that.
> $known_extensions lists all the extensions Configure 'knows' about.
> Only the subset in $extensions was actually selected by the user to be
> included with perl.  The user is not required to install every extension
> shipped with the perl tarball.

I haven't done this. I guess I should open a new ticket in RT for this.
For me it's a "nice to have" but there's a bunch of other stuff that is
nicer. But it's a pure-Perl task, so anyone on the list could take it on.

> Anyway, feel free to fix and document it however makes sense in the new
> era.  However, I'd recommend documenting that nobody should actually be
> *using* known_extensions for anything.  They should be using $extensions.

I made these changes to Porting/Glossary:

diff --git a/Porting/Glossary b/Porting/Glossary
index b57f990..1f5b8c9 100644
--- a/Porting/Glossary
+++ b/Porting/Glossary
@@ -2666,7 +2666,7 @@ expr (Loc.U):
 extensions (Extensions.U):
 	This variable holds a list of all extension files (both XS and
-	non-xs linked into the package.  It is propagated to
+	non-xs) installed with the package.  It is propagated to
 	and is typically used to test whether a particular extension
 	is available.
@@ -3620,8 +3620,12 @@ ivtype (perlxv.U):
 	This variable contains the C type used for Perl's IV.
 known_extensions (Extensions.U):
-	This variable holds a list of all XS extensions included in
-	the package.
+	This variable holds a list of all extensions (both XS and non-xs)
+	included in the package source distribution.  This information is
+	only really of use during the Perl build, as the list makes no
+	distinction between extensions which were build and installed, and
+	those which where not.  See "extensions" for the list of extensions
+	actually built and available.
 ksh (Loc.U):
 	This variable is defined but not used by Configure.
@@ -3990,8 +3994,10 @@ nm_so_opt (usenm.U):
 	Maybe Linux should just always set usenm=false.
 nonxs_ext (Extensions.U):
-	This variable holds a list of all non-xs extensions included
-	in the package.  All of them will be built.
+	This variable holds a list of all non-xs extensions built and
+	installed by the package.  By default, all non-xs extensions
+	distributed will be built, with the exception of platform-specific
+	extensions (currently only one VMS specific extension).
 nroff (Loc.U):
 	This variable is used internally by Configure to determine the

I don't think that this RT can be considered resolved until has
been updated to be consistent with Configure.

Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About