Charles Lane wrote:

> This doesn't do automatic searches for extensions (I've got a bit
> of DCL that *almost* does this, but you'd have to tell it what you
> *don't* want built).  Instead it just changes the syntax of the
> extensions in $Config{extensions} from 
>       File::Glob     to    File/Glob
> 
> Included is is a patch to CONFIGURE.COM, to SUBCONFIGURE.COM for
> the "canonical" BUILD_EXT.COM, and a patch to t/lib/glob-basic.t
> so that it'll won't give us a bogus error when (after the change
> above) it actually *does* run on VMS.
> 
>   
> --- configure.com-orig        Fri Mar  3 23:55:23 2000
> +++ configure.com     Fri Mar  3 23:48:24 2000
> @@ -1969,6 +1969,40 @@
>  $ rp = "[''dflt'] "

This is great work Charles.  But I wonder if this may be the wrong
approach.  Isn't it nice to have "File::Glob" in `perl "=V:extensions"`?
So that if I want documentation I type:

    perl "-V:extensions"
    perldoc File::Glob

I get the doc for the perl package name I specified.

That is, perhaps we should convince the Unix perl folks that their
$Config{extensions} is wrong to use '/' in place of '::' and that perhaps 
they ought to map it to '::'.  Perhaps in the meantime we ought to do 
something like this:

$ gdiff -u t/lib/glob-basic.t;1 t/lib/glob-basic.t
--- t/lib/glob-basic.t;1        Fri Mar  3 20:12:04 2000
+++ t/lib/glob-basic.t  Mon Mar  6 09:38:36 2000
@@ -4,7 +4,7 @@
     chdir 't' if -d 't';
     unshift @INC, '../lib';
     require Config; import Config;
-    if ($Config{'extensions'} !~ /\bFile\/Glob\b/i) {
+    if ($Config{'extensions'} !~ /\bFile(\/|::)Glob\b/i) {
         print "1..0\n";
         exit 0;
     }
End of diff.

It will be the case that the MacPerl folks will eventually need to do 
something about this as well (their directory separator is ":").

I am not too attached to either approach and I do realize that my reply to you 
might have inspired you to take the approach you did.  But I think that the
perl package hierarchy syntax is a good thing (tm).  They argued to change it 
to "::" from "'" in the perl 4 -> 5 transition, in part to appease emacs users.
It is somewhat ironic that VMS is one rare platform in that "::" means 
something in a path specifier.  Other languages such as C, C++, Java use "." 
for struct/class hierarchy which is the path separator on VMS, but the period 
is the string concatenator in perl.

What do you think about changing the regular expression?

Peter Prymmer

Reply via email to