Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Help to override Spreadsheet/ParseXLSX.pm module

by Tux (Canon)
on Apr 03, 2021 at 05:35 UTC ( [id://11130759]=note: print w/replies, xml ) Need Help??


in reply to Re: Help to override Spreadsheet/ParseXLSX.pm module
in thread Help to override Spreadsheet/ParseXLSX.pm module

As the OP said they're using Spreadsheet::Read, at this moment, only monkeypatching is a possible way out.

I will see if adding your own subclassed class to overrulle supported classed would be possible as an option. Currently it is not, as my wrapper checks on the class name, which would have to be changed to check if the parser used is a subclass of the supported parser. And of course it needs a new method to tell Read overrulle the existing parser.

boleary please add your request as feature wish to ParseXLSX issues and the wish to subclass parsers to Read issues.


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^3: Help to override Spreadsheet/ParseXLSX.pm module
by LanX (Saint) on Apr 03, 2021 at 09:28 UTC
    Thanks, personally I generally prefer monkeypatching over subclassing.

    I mentioned it tho, because people kept criticizing me for that.

    In my experience is subclassing only a good way, if the original author supported it from the beginning.

    Monkeypatching is closer to the metal, and it's clear why it fails if it fails.

    Exception here: I doubt monkeypatching is threadsafe, but I never tried.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Re^3: Help to override Spreadsheet/ParseXLSX.pm module
by boleary (Scribe) on Apr 03, 2021 at 12:20 UTC

    As I noted in my reply to Rolf... I think I subclassed it... I'm very weak with OO terminology
    It may be more of a monkeypatch since it really just redefines the 2 named subs

    I will add the feature request, but it looks like the ParseXLXS module hasn't been touched since 2016 so do you think a feature request would even help?
    I did add a pullrequest #98 on gitHub with my changes

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11130759]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-03-29 08:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found