in reply to How to patch standard modules from CPAN on Linux etc?

Instead of patching Spreadsheet::ParseExcel, being it an object oriented module, maybe you could subclass it replacing the affected methods for your own versions.

Also, if the problem can potentially affect any file created by some common application (as for instance OO.org or gnumeric) it would make sense to get the patch incorporated on the main version.

  • Comment on Re: How to patch standard modules from CPAN on Linux etc?

Replies are listed 'Best First'.
Re^2: How to patch standard modules from CPAN on Linux etc?
by sflitman (Hermit) on Oct 25, 2008 at 06:14 UTC
    Even better, convert the files to XML, then apply a filter to change the weird dates. Then an update on a client's system doesn't trash your patched local version of a standard CPAN module.

    SSF

Re^2: How to patch standard modules from CPAN on Linux etc?
by BerntB (Deacon) on Oct 26, 2008 at 08:37 UTC

    Should have thought about that myself. :-) That might be easiest. You can override the formatting class for Spreadsheet::ParseExcel (and there is some alternative for different languages already).

    Update: I should add that I ended up overriding the Spreadsheet::ParseExcel::FmtDefault module (really easy and neat design) and just changed what the FmtString returned. I learned a bit about making my own code flexible.