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

Hello Monks,
I would like to install a path for CPAN Module
(Module::ScanDeps for this reason... I have the same problem).

To install the patch is it sufficient to insert it in the main folder with the module sources and then "perl Makefile.PL, dmake test, dmake, dmake install"?

Or what I have to do, to install that patch?
Thank you in advance

Replies are listed 'Best First'.
Re: Installing a patch for a CPAN Module
by syphilis (Archbishop) on Jun 24, 2010 at 08:58 UTC
    Hi,
    You would normally use the 'patch' utility (which comes with recent versions of Strawberry perl - and is otherwise found readily). If you have Strawberry Perl try entering:
    patch --help
    Often it's just a matter of running 'patch ScanDeps.pm ScanDeps.patch' - which should suffice in this instance.

    For a small patch, you can always do it by hand if you like. The patch on the page you linked to could be applied by hand by replacing (in ScanDeps.pm):
    # 5.8.x push @files, (map "$dir/$_.pl", qw( Exact Canonical ));
    with
    # 5.8.x and higher push @files, (map "$dir/$_.pl", qw( Exact Canonical Heavy ));
    Cheers,
    Rob
      Done by hand!

      It works!
      Thank you!
Re: Installing a patch for a CPAN Module
by moritz (Cardinal) on Jun 24, 2010 at 08:55 UTC

    The standard module installing procedure doesn't automagically pick up patches; you have to patch first before configuring, building and installing.

    You can either do that manually, or create a local CPAN::Mini mirror (just about 1GB of disk space, and speeds up module installation greatly), and then use CPAN::Mini::Inject to inject the patched module.

    Perl 6 - links to (nearly) everything that is Perl 6.
      it sounds great. I'll try it.




      I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Re: Installing a patch for a CPAN Module
by Khen1950fx (Canon) on Jun 24, 2010 at 08:44 UTC
    You could try using patch.