Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 681
Status: resolved
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: jhi [...] iki.fi
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 6.00
Fixed in: (no value)



Subject: bleadperl #16851 (part of)
A small Perl version nit in MM_NW5.pm.
[guest - Wed May 29 09:33:43 2002]: Show quoted text
> A small Perl version nit in MM_NW5.pm.
Can't hard code the version number like this, welcome to life on CPAN. I'll have to reconstruct it from $] or something.
Here's what I've done instead (attached).
Index: MM_NW5.pm =================================================================== RCS file: /home/cvs/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm,v retrieving revision 1.16 diff -u -r1.16 MM_NW5.pm --- MM_NW5.pm 30 May 2002 18:28:49 -0000 1.16 +++ MM_NW5.pm 30 May 2002 18:45:17 -0000 @@ -327,7 +327,10 @@ MAKE_FRAG } - $m .= ' $(LD) $(LDFLAGS) $(OBJECT:.obj=.obj) -desc "Perl 5.7.3 Extension ($(BASEEXT)) XS_VERSION: $(XS_VERSION)" -nlmversion $(NLM_VERSION)'; + # Reconstruct the X.Y.Z version. + my $version = join '.', map { sprintf "%d", $_ } + $] =~ /(\d)\.(\d{3})(\d{2})/; + $m .= sprintf ' $(LD) $(LDFLAGS) $(OBJECT:.obj=.obj) -desc "Perl %s Extension ($(BASEEXT)) XS_VERSION: $(XS_VERSION)" -nlmversion $(NLM_VERSION)', $version; # Taking care of long names like FileHandle, ByteLoader, SDBM_File etc if($self->{NLM_SHORT_NAME}) {