Neighbour has asked for the wisdom of the Perl Monks concerning the following question:

I've tried to get Devel::LeakTrace installed using cpan. However, this module wants glibc-1.2 where the system has glibc-2.0 installed.
So cpan's make fails (Build.PL returns 512).

After patching said Build.PL to use either glib 1.2 or 2.0, a manual execution of Build.PL shows all is well:

root@system:~/.cpan/build/Devel-LeakTrace-0.05-aX0FLa# /usr/bin/perl B +uild.PL Checking whether your kit is complete... Looks good Checking prerequisites... Looks good Creating new 'Build' script for 'Devel-LeakTrace' version '0.05'

However, when going back into cpan, it still claims Build.PL fails:

Running make for module 'Devel::LeakTrace' Running Build for R/RC/RCLAMP/Devel-LeakTrace-0.05.tar.gz Has already been unwrapped into directory /root/.cpan/build/Devel-Le +akTrace-0.05-aX0FLa '/usr/bin/perl Build.PL ' returned status 512, won't make
How do I get cpan to actually try again? (without unwrapping the package again, since that would kill my patch).

Replies are listed 'Best First'.
Re: (re)build a module with cpan
by moritz (Cardinal) on Apr 04, 2011 at 10:29 UTC
      cpan ..apparently rebuilds *all* modules present under /root/.cpan/build which isn't quite what I wanted.
      However, executing cpan . seems to work (from /root/.cpan/build/Devel-LeakTrace-0.05-aX0FLa/).
      Odd though that it proclaims that Directory '/root/.cpan/build/Devel-LeakTrace-0.05-aX0FLa/.' not below /root/.cpan/build, but that's another verse :)
Re: (re)build a module with cpan
by Neighbour (Friar) on Apr 04, 2011 at 12:35 UTC
    In hindsight, telling cpan to force make Devel::LeakTrace makes it ignore its earlier recorded output.
Re: (re)build a module with cpan
by Anonymous Monk on Apr 04, 2011 at 11:16 UTC
    How do I get cpan to actually try again? (without unwrapping the package again, since that would kill my patch).

    What I do is bump the version number (append 01 ) and then make dist, and copy the resulting tarball to my custom_sources

    See Maintaining Local CPAN Patches