Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Methods, within a class, pass callbacks; how to deal with that in derived class?

by Anonymous Monk
on Oct 13, 2024 at 13:32 UTC ( [id://11162232]=note: print w/replies, xml ) Need Help??


in reply to Methods, within a class, pass callbacks; how to deal with that in derived class?

Will it hurt performance

In fact, this concern is no longer relevant. As I have just checked myself, calling "traverse" with string vs. coderef as an argument results in average time for some operation rising to ~4.1 s from ~4.0 s for what serves me as "most internally complex PDF sample I'm testing against" in my zoo of files. That is not a problem at all; I'll override every original method which call "traverse", they are just a few, to eliminate a bug I stumbled upon and possible future traps. I'm still wondering if passing around "hard" callback coderefs, in OOP environment, was a good idea.

  • Comment on Re: Methods, within a class, pass callbacks; how to deal with that in derived class?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2025-01-24 18:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (68 votes). Check out past polls.