We don't bite newbies here... much | |
PerlMonks |
Tracking processing by returning objects?by BazB (Priest) |
on May 16, 2003 at 22:19 UTC ( [id://258778]=perlquestion: print w/replies, xml ) | Need Help?? |
BazB has asked for the wisdom of the Perl Monks concerning the following question:
Howdy, Monks.
The main problem I have is tracking all the files produced by each operation, and using that information to cut back on the amount of the information required by each method call.
In my quest to simplify (at least to the caller) the amount of parameters required I've tried the following:
Both ideas above don't handle the case where the underlying data is held in a number of files, because the code decided to split them up for parallel processing for example. Anyway, after that rather lengthy introduction, how should I deal with this?
I though of returning some sort of Foo::IO object that contains all of the filenames that had been processed by a method, and all the information we might need.
If the user wants to process the output from an early stage of the code, he just uses the old Foo::IO object.
When I mentioned my problem in the CB, jwest suggested using a object that contained several file objects that could be used for this sort of problem. So, my questions are:
Hopefully I've explained my problem with sufficient detail. If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
Back to
Seekers of Perl Wisdom
|
|