good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Help to override Spreadsheet/ParseXLSX.pm moduleby LanX (Saint) |
on Apr 02, 2021 at 21:06 UTC ( [id://11130734]=note: print w/replies, xml ) | Need Help?? |
In general there are two approaches which come to mind.
The first is achieved by creating a new "patch" module inheriting (or importing) from the original class and overriding the differing methods. The second is done by changing the differing subs right in place with local *Original::Class::method = sub {...} just before calling the module. Note that because of the local all changes only happen temporarily till the end of scope of the calling sub. Like this other applications won't be affected. HTH! :)
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|