Skip Menu |

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 72176
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: w.phillip.moore [...] gmail.com
Cc:
AdminCc:

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



Subject: pod2html will fail with an empty podpath in some cases
I've found a very small bug that I doubt anyone else will see. My perl development environment supports installing each CPAN module into it's own independent directory structure, independent from all the others. The code that automates this ensures that nothing tries to write to the perl5 core directories (which are readonly anyway), by overridding most of the Config.pm paths to be specific to that build. Those paths don't exist yet, until we pass the tests and then run "make install", so at that point in time, the code that generates the @podpath will produce an empty string, simply because of some missing parens. Basically, the code does the equivalent of: my @foo = ( @bar ), $blah; and $blah doesn't end up in @foo, like you obviously intended. The attached patch corrects this, and the resulting build passes the test suite on AIX 6, Solaris 10 and RHEL 5, for all of 5.10.1, 5.12.4, and 5.14.2.
Subject: 01_htmlify_pods.patch
diff -rc ../Module-Build-0.3800-orig/lib/Module/Build/Base.pm ./lib/Module/Build/Base.pm *** ../Module-Build-0.3800-orig/lib/Module/Build/Base.pm Sat Mar 5 14:15:41 2011 --- ./lib/Module/Build/Base.pm Fri Nov 4 11:06:07 2011 *************** *** 3351,3361 **** : $self->original_prefix('core'); my $htmlroot = $self->install_sets('core')->{libhtml}; ! my @podpath = (map { File::Spec->abs2rel($_ ,$podroot) } grep { -d } ( $self->install_sets('core', 'lib'), # lib $self->install_sets('core', 'bin'), # bin $self->install_sets('site', 'lib'), # site/lib ! ) ), File::Spec->rel2abs($self->blib); my $podpath = $ENV{PERL_CORE} ? File::Spec->catdir($podroot, 'lib') --- 3351,3361 ---- : $self->original_prefix('core'); my $htmlroot = $self->install_sets('core')->{libhtml}; ! my @podpath = ( (map { File::Spec->abs2rel($_ ,$podroot) } grep { -d } ( $self->install_sets('core', 'lib'), # lib $self->install_sets('core', 'bin'), # bin $self->install_sets('site', 'lib'), # site/lib ! ) ), File::Spec->rel2abs($self->blib) ); my $podpath = $ENV{PERL_CORE} ? File::Spec->catdir($podroot, 'lib')
Subject: pod2html will fail with an empty podpath in some cases
I've found a very small bug that I doubt anyone else will see. My perl development environment supports installing each CPAN module into it's own independent directory structure, independent from all the others. The code that automates this ensures that nothing tries to write to the perl5 core directories (which are readonly anyway), by overridding most of the Config.pm paths to be specific to that build. Those paths don't exist yet, until we pass the tests and then run "make install", so at that point in time, the code that generates the @podpath will produce an empty string, simply because of some missing parens. Basically, the code does the equivalent of: my @foo = ( @bar ), $blah; and $blah doesn't end up in @foo, like you obviously intended. The attached patch corrects this, and the resulting build passes the test suite on AIX 6, Solaris 10 and RHEL 5, for all of 5.10.1, 5.12.4, and 5.14.2.
Subject: 01_htmlify_pods.patch
diff -rc ../Module-Build-0.3800-orig/lib/Module/Build/Base.pm ./lib/Module/Build/Base.pm *** ../Module-Build-0.3800-orig/lib/Module/Build/Base.pm Sat Mar 5 14:15:41 2011 --- ./lib/Module/Build/Base.pm Fri Nov 4 11:06:07 2011 *************** *** 3351,3361 **** : $self->original_prefix('core'); my $htmlroot = $self->install_sets('core')->{libhtml}; ! my @podpath = (map { File::Spec->abs2rel($_ ,$podroot) } grep { -d } ( $self->install_sets('core', 'lib'), # lib $self->install_sets('core', 'bin'), # bin $self->install_sets('site', 'lib'), # site/lib ! ) ), File::Spec->rel2abs($self->blib); my $podpath = $ENV{PERL_CORE} ? File::Spec->catdir($podroot, 'lib') --- 3351,3361 ---- : $self->original_prefix('core'); my $htmlroot = $self->install_sets('core')->{libhtml}; ! my @podpath = ( (map { File::Spec->abs2rel($_ ,$podroot) } grep { -d } ( $self->install_sets('core', 'lib'), # lib $self->install_sets('core', 'bin'), # bin $self->install_sets('site', 'lib'), # site/lib ! ) ), File::Spec->rel2abs($self->blib) ); my $podpath = $ENV{PERL_CORE} ? File::Spec->catdir($podroot, 'lib')
Thank you for the bug report and patch.
Subject: Re: [rt.cpan.org #72176] pod2html will fail with an empty podpath in some cases
Date: Wed, 17 Apr 2013 08:57:24 -0400
To: bug-Module-Build [...] rt.cpan.org
From: Phillip Moore <w.phillip.moore [...] gmail.com>
This bug has remained broken for well over a year, and I've had to re-apply this patch to every release that has come out in the interim. Can you PLEASE save me these steps and apply this patch? It's been applying to the code clean the entire time, and solving the problem, which as I diagnosed is about as obvious a bugfix as you'll ever encounter. Please.... Pretty please.... On Fri, Nov 4, 2011 at 2:13 PM, David Golden via RT < bug-Module-Build@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=72176 > > > Thank you for the bug report and patch. >
Okay okay, since you asked so nicely, I fixed it. =) Sorry about the delay, thanks for the fix & persistence. 344d1ca in git. -Ken
Subject: Re: [rt.cpan.org #72176] [PATCH] pod2html will fail with an empty podpath in some cases
Date: Wed, 17 Apr 2013 11:28:21 -0400
To: bug-Module-Build [...] rt.cpan.org
From: Phillip Moore <w.phillip.moore [...] gmail.com>
Many thanks -- seriously. On Wed, Apr 17, 2013 at 11:18 AM, Ken Williams via RT < bug-Module-Build@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=72176 > > > Okay okay, since you asked so nicely, I fixed it. =) > > Sorry about the delay, thanks for the fix & persistence. 344d1ca in git. > > -Ken >