Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: jleader [...] alumni.caltech.edu
Cc:
AdminCc:

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



Subject: Broken example in Cookbook.pm
In the "Changing the order of the build process" section of Module::Build::Cookbook.pm, the example code contains (line 227 in Module-Build-0.2808-01): my $i = grep {$e[$_] eq 'pod'} 0..$#e; This grep returns a list of indices where the string 'pod' appears in @e; $i gets set to the size of the list (always 1 assuming 'pod' only appears once in @e). I believe a more correct version of the code to set $i to the index of the first appearance of 'pod' in @e would be: my ($i) = grep {$e[$_] eq 'pod'} 0..$#e; FWIW, I'm running "perl, v5.8.8 built for i386-linux-thread-multi" under "CentOS release 5 (Final)" (Linux kernel version "2.6.18-53.1.14.el5 #1 SMP").
Thanks Jeremy, fixed now. -Ken