Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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

In reply to Re^2: Help to override Spreadsheet/ParseXLSX.pm module by boleary
in thread Help to override Spreadsheet/ParseXLSX.pm module by boleary

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-03-28 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found