Thanks Rolf!
So I think I subclassed it with a patch module :)
For my reference:
I copied the ParseXLSX.pm module to CE_ParseXLSX_patch.pm
then I removed all the subs which I did not modify,
so I was left with new and _parseworkbook
I located CE_ParseXLSX_patch.pm to a new directory in my repo:
COMMON/Spreadsheet/
COMMON is in @INC
Then I added a use Spreadsheet::CE_ParseXLSX_patch
in the original module that had
use Spreadsheet::Read
When I run the code, I get the warning that 2 subs are overridden,
And my modifications work!
Subroutine new redefined at ../Spreadsheet/CE_ParseXLSX_patch.pm line
+19.
at ../Spreadsheet/CE_ParseXLSX_patch.pm line 19.
require Spreadsheet/CE_ParseXLSX_patch.pm called at ../portable_sp
+readsheet_subs.pm line 4
main::BEGIN() called at ../Spreadsheet/CE_ParseXLSX_patch.pm line
+19
eval {...} called at ../Spreadsheet/CE_ParseXLSX_patch.pm line 19
require portable_spreadsheet_subs.pm called at ../write_csv_ss.pm
+line 3
require write_csv_ss.pm called at ../renameRules.pm line 5
require renameRules.pm called at ../simpleBga.pm line 3
require simpleBga.pm called at ../pin_report_modules.pm line 2
require pin_report_modules.pm called at ../read_pin_report.pm line
+ 3
require read_pin_report.pm called at d:/GitHub/CE_TOOLS/COMMON/TES
+TS/test_acust_daisy_chain.pl line 35
Subroutine _parse_workbook redefined at ../Spreadsheet/CE_ParseXLSX_pa
+tch.pm line 37.
at ../Spreadsheet/CE_ParseXLSX_patch.pm line 37.
require Spreadsheet/CE_ParseXLSX_patch.pm called at ../portable_sp
+readsheet_subs.pm line 4
main::BEGIN() called at ../Spreadsheet/CE_ParseXLSX_patch.pm line
+37
eval {...} called at ../Spreadsheet/CE_ParseXLSX_patch.pm line 37
require portable_spreadsheet_subs.pm called at ../write_csv_ss.pm
+line 3
require write_csv_ss.pm called at ../renameRules.pm line 5
require renameRules.pm called at ../simpleBga.pm line 3
require simpleBga.pm called at ../pin_report_modules.pm line 2
require pin_report_modules.pm called at ../read_pin_report.pm line
+ 3
require read_pin_report.pm called at d:/GitHub/CE_TOOLS/COMMON/TES
+TS/test_acust_daisy_chain.pl line 35
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|