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.
|
|---|
| 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 | |
by BrowserUk (Patriarch) on Jun 27, 2008 at 06:59 UTC |