Welcome to the Monastery | |
PerlMonks |
Data Structures design help to represent function args for testingby goibhniu (Hermit) |
on Sep 20, 2007 at 21:22 UTC ( [id://640231]=perlquestion: print w/replies, xml ) | Need Help?? |
goibhniu has asked for the wisdom of the Perl Monks concerning the following question: I have some perl modules that were left behind by some consultants. They didn't use strict (and when they set stuff up I didn't know enough to make them). I'm trying to extend their work and reuse their code, but it's kludgey, doesn't use strict and some of it just doesn't work. So I've set about to refactor. I'm trying to build in some safety nets and I'm trying to do some things right. Here's what I've done:
I'm getting a little stuck on the baselining and test harnessing. I haven't used Test::Anything before and am reading those. I started with:
(I'm not using strict because they're not using strict and it just blows up totally; I intend to use strict after I've got the baseline of what they do now). Some of their functions run without args, some work without args but give screwy results, some kill the script and block the rest of the tests. I want to go function by function and make a set of test args so at least I'm calling them in good faith for the baseline. What data structure should I use to represent the function args? I humbly seek wisdom.
Back to
Seekers of Perl Wisdom
|
|