http://www.perlmonks.org?node_id=552403


in reply to Re^2: Professional development with Perl - how it's done?
in thread Professional development with Perl - how it's done?

I really don't think modifying CPAN code is good practise, unless it's to fix a serious bug that you then give back to the author.

If I really want to modify the behaviour of a CPAN module and it's not reasonable to subclass (or I couldn't be bothered ;) I usually inject my own subs/methods into the namespace from my own code. That way you don't need to carry around modified CPAN modules. And with any luck, minor upgrades to the cpan module won't break your addins (which are hopefully based on documented API anyway).

  • Comment on Re^3: Professional development with Perl - how it's done?

Replies are listed 'Best First'.
Re^4: Professional development with Perl - how it's done?
by techcode (Hermit) on May 30, 2006 at 10:33 UTC
    I agree - well mostly.

    For instance - I needed to modify one of those modules that takes care of config files. I'm not anymore sure which one it is (nor where it is on my computer - repository should help with organization) - it supports blocks (.ini style). And I needed a list of all the blocks in the config file - but that feature was missing. So I added it ...

    I did send an email to the author, but without response ... guess he didn't wanted to bug with a guy that doesn't know to use diff and submit a patch :D


    Have you tried freelancing? Check out Scriptlance - I work there.