In article 
<[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Craig A. Berry") wrote:

> On Dec 6, 2007 7:43 PM, Craig A. Berry <[EMAIL PROTECTED]> wrote:
> I'm afraid we need nicetext
> back, at least on VMS, and we'll just have to tune up the regex 

The attached patch does those things and gets all of the core 
extensions to build with YAML generation intact on VMS.  So except for 
version bumps and a changelog entry, this could become 6.41.  I didn't 
restore the MM_Unix.t test for nicetext if that's important.  Sorry for 
the churn.
--- lib/ExtUtils/MakeMaker.pm;-0        Thu Dec  6 05:43:47 2007
+++ lib/ExtUtils/MakeMaker.pm   Thu Dec  6 20:39:03 2007
@@ -635,7 +635,7 @@ END
             my(%a) = %{$self->{$section} || {}};
             push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:";
             push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a;
-            push @{$self->{RESULT}}, $self->$method( %a );
+            push @{$self->{RESULT}}, $self->nicetext($self->$method( %a ));
         }
     }
 
--- lib/ExtUtils/MM_Unix.pm;-0  Thu Dec  6 05:43:47 2007
+++ lib/ExtUtils/MM_Unix.pm     Thu Dec  6 20:39:03 2007
@@ -2646,6 +2646,22 @@ sub needs_linking {
     return $self->{NEEDS_LINKING} = 0;
 }
 
+=item nicetext
+
+misnamed method (will have to be changed). The MM_Unix method just
+returns the argument without further processing.
+
+On VMS used to insure that colons marking targets are preceded by
+space - most Unix Makes don't need this, but it's necessary under VMS
+to distinguish the target delimiter from a colon appearing as part of
+a filespec.
+
+=cut
+
+sub nicetext {
+    my($self,$text) = @_;
+    $text;
+}
 
 =item parse_abstract
 
--- lib/ExtUtils/MM_VMS.pm;-0   Thu Dec  6 05:43:47 2007
+++ lib/ExtUtils/MM_VMS.pm      Thu Dec  6 20:32:27 2007
@@ -1571,7 +1571,23 @@ map_clean :
 
     join '', @m;
 }
+  
+# --- Output postprocessing section ---
 
+=item nicetext (override)
+
+Insure that colons marking targets are preceded by space, in order
+to distinguish the target delimiter from a colon appearing as
+part of a filespec.
+
+=cut
+
+sub nicetext {
+    my($self,$text) = @_;
+    return $text if $text =~ m/^\w+\s*=/; # leave macro defs alone
+    $text =~ s/^([^\s:]+)(:+\s)/$1 $2/mg;
+    $text;
+}
 
 =item prefixify (override)
 
--- lib/ExtUtils/t/MM_VMS.t;-0  Thu Dec  6 05:43:47 2007
+++ lib/ExtUtils/t/MM_VMS.t     Thu Dec  6 20:39:03 2007
@@ -56,6 +56,7 @@ BEGIN {
                    test_via_harness
                    test_via_script
                    makeaperl
+                   nicetext
                   ));
 }
 

Reply via email to