I'm programming an application that uses WxPerl, but the Wx::Grid class is missing the method UseNativeColHeader. What can I do to call this method anyway?
What about event? The event EVT_GRID_COL_SORT is not implemented either in WxPerl. Is there a way to bypass the restriction in pure Perl?
If you know the expected arguments for the missing method, you can rig you own method with that name and inject it into the BEGIN block, then it will be available to the module in question.
In order for this to work you will need to make sure you load that module first (in the BEGIN block) and then define the (empty, unless you know what's supposed to be there) subroutine, making sure it returns the proper value so that Wx::Grid does not error out on you.
If possible, you could just find the source somewhere and drop it into the BEGIN block instead, unless you are just looking to get by without it. However, if you are after the actual "identical" behavior you may be looking at re-inventing the wheel a bit.
I might be able to elaborate a bit more if I had more information on what you really need to have (do you need to call those methods and generate those events, are you able to update modules where you are, etc).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With