Subject: | Bug in Makefile.PL on non-Unix platforms |
Date: | Mon, 1 Jun 2009 23:17:24 -0700 (PDT) |
To: | bug-MP3-Tag [...] rt.cpan.org |
From: | Eric Benson <eric_a_benson [...] yahoo.com> |
It appears that the creation of the ./lib subdirectory caused manifypods() in Makefile.PL to fail on platforms where : is not a legal file name constituent. I discovered this bug while building on Cygwin. This code did not change, the bug was already there, but was not apparent until the source tree shifted. If this bug is not fixed, MP3::Tag cannot be built on Cygwin, and possibly not on Win32 as well, although I haven't tried that.
I have a fix for this bug which is a little ugly. It involves cutting and pasting some code from ExtUtils::MakeMaker. However, it does fix the bug. Basically I just copied the piece of code from init_MAN3PODS in MM_Unix that your local version of manifypods() was skipping.
-------------------------------------------------------------------
package MY;
sub manifypods {
my $self = shift;
my $manpagename = 'lib/MP3/Tag/ID3v2-Data.pod';
my $parentlibs_re = join '|', @{$self->{PMLIBPARENTDIRS}};
unless($manpagename =~ s!^\W*($parentlibs_re)\W+!!s) {
$manpagename = $self->catfile(
split(/::/,$self->{PARENT_NAME}),$manpagename
);
}
$manpagename = $self->replace_manpage_separator($manpagename);
$self->{MAN3PODS}->{'lib/MP3/Tag/ID3v2-Data.pod'} =
$self->catfile("\$(INST_MAN3DIR)", "$manpagename.\$(MAN3EXT)");
$self->SUPER::manifypods(@_);
}
-------------------------------------------------------------------
A better solution would be to find a way to add this target to the list $self->{PM} prior to the processing done in init_MAN3PODS, but I have not pursued this approach.
I learned more than I ever wanted to know about ExtUtils::MakeMaker tonight.