shemp has asked for the wisdom of the Perl Monks concerning the following question:
But, at some point the new parser will want to take over from the old parser. If all the functions / classes / methods in the new parser are coded with different names, we'll have to go through that code and modify all the names of the functions and the calling of them.sub parallel_tester { # assume neither parser modifies @_ my $old_result = old_parser(@_); my $new_result = new_parser(@_); compare_n_report($old_result, $new_result, @_); }
So, we're trying to figure out the best way to deal with this code crossover. The main idea we have is to play some sort of games with package names so that all that needs to be done is change what is required / used etc.
I know that this is a quite vague question, and we haven't experimented much, but i see us going down a lot of very wrong paths before figuring out a good way to handle this upgrade. And unfortunately, this isnt a matter of replacing a function with a new version and testing the logic of that function, because the function could behave exactly as we designed it to, but because of the overall problem, the whole thing needs to be tested as a unit, and there will actually be very little replacing of one part of the old code with a new version, the whole project will be re-written.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Clean code transition - how?
by dragonchild (Archbishop) on May 03, 2005 at 18:13 UTC | |
|
Re: Clean code transition - how?
by scmason (Monk) on May 03, 2005 at 18:46 UTC | |
|
Re: Clean code transition - how?
by Fletch (Bishop) on May 03, 2005 at 18:37 UTC | |
|
Re: Clean code transition - how?
by mstone (Deacon) on May 03, 2005 at 21:00 UTC | |
|
Re: Clean code transition - how?
by graff (Chancellor) on May 04, 2005 at 02:28 UTC |