mm_vms.pm question.

2005-04-04 Thread John E. Malmberg

In MM_VMS.PM, there is a comment that unixify will sometimes return a
string with an off-by-one trailing null.

And what does that mean?  More than one null terminator?

Do you have a reproducer for that problem?

Thanks,

-John
[EMAIL PROTECTED]
Personal Opinion Only



Re: mm_vms.pm question.

2005-04-04 Thread Michael G Schwern
On Mon, Apr 04, 2005 at 09:15:54PM -0500, John E. Malmberg wrote:
 
 In MM_VMS.PM, there is a comment that unixify will sometimes return a
 string with an off-by-one trailing null.
 
 And what does that mean?  More than one null terminator?

Looks like it.  I guess the length of the string reported in the SV
was off-by-one possibly as a result of a regex bug or some XS code...
though I don't see any obious XS code in VMS::Filespec.


 Do you have a reproducer for that problem?

Hmm, that comment is fairly recent... r1245.  3.27.2003

  unixify() has an intermittant off-by-one terminating null bug in 5.8.0.
  Working around.

I don't see any mention of what the problem was on vmsperl and I don't
remember what the problem was.

If you're feeling daring you can cut that line out of your copy of MM_VMS
and wait for the explosion. :)



Re: mm_vms.pm question.

2005-04-04 Thread Craig A. Berry
At 9:15 PM -0500 4/4/05, John E. Malmberg wrote:
In MM_VMS.PM, there is a comment that unixify will sometimes return a
string with an off-by-one trailing null.

And what does that mean?  More than one null terminator?

Perl strings are roughly equivalent to dynamic string descriptors on
VMS.  The length is stored internally so you shouldn't see the null
byte from Perl.  It looks like there was a bad length calculation at
some point or other problem that caused the length to include the
null.

This workaround apparently came into the core with the following
patch, though may have been in an independent release of MM before
that:

http://public.activestate.com/cgi-bin/perlbrowse?patch=19099

Do you have a reproducer for that problem?

No, but the following bug fix from just about a year ago may be related:

http://public.activestate.com/cgi-bin/perlbrowse?patch=22544

http://www.nntp.perl.org/group/perl.vmsperl/12349
-- 

Craig A. Berry
mailto:[EMAIL PROTECTED]

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