Re: Win32: C:\Program Files

2002-11-14 Thread Nick Ing-Simmons
Ken Williams [EMAIL PROTECTED] writes:


Is there no way to use the multi-arg system() to avoid these 
quoting issues altogether?

No - it does not avoid the issue only moves it.

You can use it to move the problem to the win32 system() code 
which has to assemble a command line from the multi-args.
But I guess that code should be in good shape by now, and if not 
is maintained by people that should know the issues.

-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/




Re: A cross-platform, safe: echo some data file

2002-11-14 Thread Nick Ing-Simmons
Michael G Schwern [EMAIL PROTECTED] writes:
This is driving me up the wall.

The ppd target currently looks something like this:

ppd:
$(NOECHO) $(PERL) -e print qq{SOFTPKG NAME=\$(DISTNAME)\ VERSION=\6
,05,0,0\\n\tTITLE$(DISTNAME)/TITLE\n\tABSTRACT/ABSTRACT\n\tAUTHOR/A
UTHOR\n}  $(DISTNAME).ppd

All this makes writing a simple command to write an arbitrary string to a
file really difficult and worse it scatters escaping code all over
MakeMaker.  It can't possibly be this bad.

I'm tempted to come up with some sort of method which you pass in some perl
code and it generates a platform-specific, safe one-liner.  That sort of
solution rapidly gets complicated as you can see from the runperl() function
in t/test.pl in the core, but it might at least let us put all the
complications in one place.

Thoughts?

ExtUtils::Command was my scheme to get rid of some long complex invokations 
in the Makefiles. 

-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/




Re: What is this manifypods() code doing?

2002-11-14 Thread Craig A. Berry
At 6:28 AM -0500 11/13/02, Michael G Schwern wrote:
Ok, I just tore the guts out of MakeMaker's manifypods.  All the platform
specific code is gone.  Want to download the snapshot from makemaker.org and
see if make manifypods generates man pages on VMS?

For starters you need this:

--- lib/ExtUtils/MM_Any.pm;-0   Wed Nov 13 05:16:34 2002
+++ lib/ExtUtils/MM_Any.pm  Thu Nov 14 13:50:49 2002
 -184,8 +184,8 

 return END_OF_TARGET;
 manifypods : pure_all $dependencies
-   \$(NOECHO)\$(POD2MAN_EXE) --section=1 --perm_rw=\$(PERM_RW) $man1pods
-   \$(NOECHO)\$(POD2MAN_EXE) --section=3 --perm_rw=\$(PERM_RW) $man3pods
+   \$(NOECHO) \$(POD2MAN_EXE) --section=1 --perm_rw=\$(PERM_RW) $man1pods
+   \$(NOECHO) \$(POD2MAN_EXE) --section=3 --perm_rw=\$(PERM_RW) $man3pods
 END_OF_TARGET
 }
 
[end of patch]

If you don't have a space after the '' then the VMS make utilities pass it to the 
shell where it means take the next token and run it as a command procedure.  After 
fixing that, pod2man complains that --perm_rw must have an argument and spews 
something that I suppose is a document in man page format to the terminal and then 
hangs.  The PERM_RW macro is not defined but I haven't had time to track down why; is 
this something new or has it just never been used before?  That's while it's creating 
section 1.  It never gets to section 3 but I guarantee that a single command that goes 
on for 30 lines or so will exceed the command buffer limits.

As a side note, the PPD target has never been fixed per the patch I sent in at RT # 
1550.

-- 

Craig A. Berry
mailto:craigberry;mac.com

... getting out of a sonnet is much more
 difficult than getting in.
 Brad Leithauser



snapshots now tagged

2002-11-14 Thread Michael G Schwern
I've added a .patch file to MakeMaker snapshots containing the date/time
when the snapshot was made.  Its just the ISO-8601 format modified to use -
instead of : so its safe for CVS tags.

MakeMaker snapshots are now tagged in the CVS repository:

symbolic names:
SNAP-2002-11-14T16-51-47-0500: 1.90
SNAP-2002-11-14T16-51-21-0500: 1.90
SNAP-2002-11-14T16-36-26-0500: 1.90
VERSION=6_03: 1.74
VERSION=6_02: 1.74
VERSION=6_01: 1.71

This should all make it easier to trace when things were done.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
This is my sig file.  Is it not nify?  Worship the sig file.
http://www.sluggy.com



Re: META.yaml

2002-11-14 Thread Ken Williams

On Friday, November 15, 2002, at 09:26  AM, Michael G Schwern wrote:

It hit me while raking leaves today that it would be absolutely 
*trivial*
for MakeMaker to do the same.  All the meta-data already exists in the
MakeMaker object.  All that's needed to be done is spit out the file.

As I mentioned privately to Schwern, the only objection I have 
is that Module::Build still needs to be better at *something*. =)

Seriously though, I still have enough faith in the M::B 
architecture and so on that I think stuff like this isn't an 
actual threat to its adoption.

We're following Module::Build's lead here and using its formats and
decisions as much as possible.  (Un|)fortuately, its all very 
flexible and
somewhat undocumented at the moment.  So we're going to be 
making things up
as we go along.

That's true.  Currently M::B doesn't *use* the META.yaml file, 
it only produces it for external tools to use.

When trying to figure out fields for the META.yml file, a nice point of
reference to use is dpkg and the Debian Policy Manual
http://www.debian.org/doc/debian-policy/
They've solved a lot of the hard packaging problems.


That's what I've been following, or at least inspired by.  I've 
seen it work really nicely in fink, for example.


[3] Module::Build uses META.yaml.  We have to use .yml for 8.3 
filesystems.
Ken, can Module::Build be changed to match?

Done.

 -Ken




Re: snapshots now tagged

2002-11-14 Thread Michael G Schwern
On Fri, Nov 15, 2002 at 10:05:52AM +1100, Ken Williams wrote:
 symbolic names:
 SNAP-2002-11-14T16-51-47-0500: 1.90
 SNAP-2002-11-14T16-51-21-0500: 1.90
 SNAP-2002-11-14T16-36-26-0500: 1.90
 VERSION=6_03: 1.74
 VERSION=6_02: 1.74
 VERSION=6_01: 1.71
 
 This should all make it easier to trace when things were done.
 
 Is this easier than using datestamps directly with the cvs -D flag?

Probably.  I've never noticed -D before.  Well, doesn't hurt to have both.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
There is a disurbing lack of PASTE ENEMA on the internet.



Re: [REPATCH MakeMaker] Play nice with Subversion

2002-11-14 Thread Michael G Schwern
On Tue, Oct 22, 2002 at 05:22:29PM +0200, Rafael Garcia-Suarez wrote:
 I wrote:
  The following patch against bleadperl makes MakeMaker ignore Subversion files,
  as it does with CVS/RCS/SCCS files. (Subversion files are kept in .svn/
  subdirectories in each directory under version control.)
 
 Sorry, bad patch, I just remembered about \B which gives a much
 better regexp to check for subversion subdirs. New patch :

Manifest calculations are always Unix style, so I think (^|\/)\.svn\/ is
safe to find all .svn directories.  The RCS and CVS regexes could be done
the same.  And oh yeah, we're supposed to be doing SCCS, too.


 --- lib/ExtUtils/MANIFEST.SKIP
 +++ lib/ExtUtils/MANIFEST.SKIPTue Oct 22 17:08:34 2002
 @@ -2,6 +2,7 @@
  \bRCS\b
  \bCVS\b
  ,v$
 +\B\.svn\b


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Cuius rei demonstrationem mirabilem sane detexi hanc subcriptis 
exigutias non caperet.



Re: What is this manifypods() code doing?

2002-11-14 Thread Michael G Schwern
On Thu, Nov 14, 2002 at 02:43:33PM -0600, Craig A. Berry wrote:
 For starters you need this:
 
 --- lib/ExtUtils/MM_Any.pm;-0   Wed Nov 13 05:16:34 2002
 +++ lib/ExtUtils/MM_Any.pm  Thu Nov 14 13:50:49 2002
 @@ -184,8 +184,8 @@
 
  return END_OF_TARGET;
  manifypods : pure_all $dependencies
 -   \$(NOECHO)\$(POD2MAN_EXE) --section=1 --perm_rw=\$(PERM_RW) $man1pods
 -   \$(NOECHO)\$(POD2MAN_EXE) --section=3 --perm_rw=\$(PERM_RW) $man3pods
 +   \$(NOECHO) \$(POD2MAN_EXE) --section=1 --perm_rw=\$(PERM_RW) $man1pods
 +   \$(NOECHO) \$(POD2MAN_EXE) --section=3 --perm_rw=\$(PERM_RW) $man3pods
  END_OF_TARGET
  }
  
 [end of patch]

Oopsie.


 After fixing that, pod2man complains that --perm_rw must have an argument
 and spews something that I suppose is a document in man page format to the
 terminal and then hangs.

Ok, just have to make that one optional.


 The PERM_RW macro is not defined but I haven't had time to track down
 why; is this something new or has it just never been used before?

Looks like it was added around 5.5.3 to MM_Unix.  It just sets the
permissions for generated man pages.  Probably doesn't make much sense on
any non-Unixen.  I'll make sure manifypods works gracefully if its not
there.

Current snapshot should be repaired.


 I guarantee that a single command that goes on for 30
 lines or so will exceed the command buffer limits.

Working on a somewhat more generic solution to the command buffer limits.
Turns out Win9x and IRIX have problems, too.  Had to clean up manifypods
first since its part of the problem.

There's a whole thread on the subject here:
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2002-09/msg01192.html
(and since the thread is broken in the archives, here's the next post)
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2002-10/msg7.html

Basically, just have a MAX_SHELL_LENGTH setting and make targets use that
intellegently so VMS doesn't have to override everything just to get around
the shell limits.


 As a side note, the PPD target has never been fixed per the patch I sent
 in at RT # 1550.

Working on a more generic solution to that, too.  The basic problem is what
to do with make variables which contain shell metacharacters (quotes,
spaces, etc...) and how to escape them without scattering lots of
$self-escape(\$data) all over MakeMaker?  Thread on this:
http://archive.develooper.com/makemaker;perl.org/msg00702.html

I'm really banging my head against the wall on that one.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Shrtr is btr.
-- Abhijit Menon-Sen in [EMAIL PROTECTED]



Re: [PATCH MM 6.05] ppd and hints portability nits

2002-11-14 Thread Michael G Schwern
Ok, lemme see what I'm up to on integrating all this.  Try the latest
snapshot.


On Sat, Sep 14, 2002 at 04:36:45PM -0500, Craig A. Berry wrote:
 1.) MakeMaker.pm : check_hints()
 
 There were two places where catdir was used but catfile was meant. On
 systems where file syntax and directory syntax are indistinguishable
 that might not matter, but on VMS it generates garbage and was causing
 hints.t to fail.

This was applied yesterday or so.


 2.) MM_Unix.pm : ppd()
 
 There were several problems here.
 
 a.) The make directive '@' in front of commands passed to the shell did
 not have a space after it, leaving ambiguity about whether or not it was
 part of the shell command. I've added the space and replaced it with the
 more portable $(NOECHO) macro.

Fixed that.


 b.) The attribute values printed to the ppd file are surrounded with
 double quotes per XML requirements, but there is no portable way to
 escape double quotes inside of double-quoted strings that works on all
 shells. I've replaced the occurrences of C\ with C\x22 and added a
 comment that I hope mitigates the obfuscation.

I figured out a portable way to escape double quotes inside double-quoted
strings.  There's now a perl_oneliner() method which generates a safe
one-liner for the current OS.  The Unix one works.  The VMS and Win32 ones
should work...


 c.) All of the dependencies were being printed with one command, which
 more often than not exceeds DCL's very limited command buffer, and with
 a lot of dependencies could conceivably overflow even more generous
 command buffers. I split this up to print each dependency with a
 separate command.

I'll address this once I figure out the whole command line length problem.


 N.B. I just happened to stumble on the ppd problems. There should
 probably be a make ppd added to one of the tests, but which one?

Been added to basic.t.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
I'll tell you what beats voodoo every time, a big ass knife.
-- Overkill Battlebot driver



Re: [PATCH MM 6.05] ppd and hints portability nits

2002-11-14 Thread Craig A. Berry
Michael G Schwern wrote:

Ok, lemme see what I'm up to on integrating all this.  Try the latest
snapshot.


OK, manifypods is still in the doghouse. One thing that may be a problem
is the double dash at the end of the POD2MAN_EXE_macro definition. This
becomes a macro in the Makefile, and a minus sign at the end of a line
gets eaten. I'd have to look up what it means to the make utility, but
this example illustrates what it does:

$ type descrip.mms
bar = foo --

foo :
  write sys$output $(bar)
$ mms/force

write sys$output foo -
foo -


I'm not sure what harm that's doing and don't fully understand what we
needed it for anyway, but I don't think you're getting what you expected.

The other thing is that $self-{MAN1PODS} and $self-{MAN3PODS} are
empty, so there is no input file. With no input file it defaults to
sending a bare template to the terminal, or at least that's what I think
is happening. Output below (possibly wrapped by MUA).

MCR perl_root:[00]perl.exe 
-ID0:[CRAIG.EXTUTILS-MAKEMAKER-SNAP.lib] -MExtUtils::Command::MM -e 
pod2man ARGV - --section=1
 --perm_rw=
Manifying
..\ Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
..\
..\ Standard preamble:
..\ 
..de Sh \ Subsection heading
..br
..if t .Sp
..ne 5
..PP
\fB\\$1\fR
..PP
...
..de Sp \ Vertical space (when we can't use .PP)
..if t .sp .5v
..if n .sp
...
..de Vb \ Begin verbatim text
..ft CW
..nf
snip



Re: [PATCH MM 6.05] ppd and hints portability nits

2002-11-14 Thread Michael G Schwern
On Thu, Nov 14, 2002 at 11:22:16PM -0600, Craig A. Berry wrote:
 I'm not sure what harm that's doing and don't fully understand what we
 needed it for anyway, but I don't think you're getting what you expected.

Its needed to stop perl from trying to interpret the --section bits as
arguments to perl.

$ perl -le 'print @ARGV' --section
Unrecognized switch: --section  (-h will show valid options).

$ perl -le 'perl -e 'print @ARGV' -- --section
--section

I can't find anything in the MMS manual to suggest -- might be special.
Unless its doing something silly like interpreting it as an Ignore Prefix.

You sure it's not the VMS shell eating it?  Does quoting it help?  A
backslash?


 The other thing is that $self-{MAN1PODS} and $self-{MAN3PODS} are
 empty, so there is no input file.

Is MAN3PODS empty in the Descrip.mms?  Its possible you don't have
INSTALLMAN*DIR set in which case MAN*PODS will be empty and no man pages
will be built.

Did you normally get man pages built on VMS?


 With no input file it defaults to sending a bare template to the terminal, 
 or at least that's what I think is happening. Output below (possibly 
 wrapped by MUA).

pod2man is using the stray '-' as the input file and I guess
Pod::Man-parse_from_file() goes to STDOUT if you don't give it an outfile.
I'll leave that behavior in since it emulates the real pod2man's behavior.

So once the stray is fixed this problem should go away.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
And God was pleased.
And Dog was happy and wagged his tail.
And Adam was greatly improved.
And Cat did not care one way or the other.
-- http://www.catsarefrommars.com/creationist.htm