in reply to Motivation for replacing object methods at runtime

Sorry, but if you think that using a whole module, and the runtime replacement of methods, to test for divisibility by 2 (or any number), is a persuasive argument for this obscure and dubious feature, then I guess we live on different planets.

And labelling what you do above with the term 'runtime polymorphism' is just plain wrong.

Finally, obscuring your argument with all that pointless Test::More stuff, does nothing to strengthen it. It simply serves to obscure the crude, sledgehammer-to-crack-a-nut nature of what you are doing.

There are some good examples out there of where runtime reassignment of object methods can be useful, but this is possibly the very worst hypothetical, would-never-be-used-for-real-work example I've yet seen.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."
  • Comment on Re: Motivation for replacing object methods at runtime

Replies are listed 'Best First'.
Re^2: Motivation for replacing object methods at runtime
by Narveson (Chaplain) on Jun 27, 2008 at 06:23 UTC
    There are some good examples out there of where runtime reassignment of object methods can be useful

    Oh, I'm so glad.

    If somebody wanted to share one of the good examples, or just link to it, that would be awesome.