[Oc-pm] Chain of subs...
Wyatt Draggoo
wyatt at draggoo.com
Fri Jul 9 12:49:20 CDT 2004
> > I'm writing a log parser for some things at work, and am
> > trying to figure
> > out the best way to run each line of the log through a chain
> > of subroutines.
> >
> > Is an array of sub references the best way to go for this?
>
> That seems as good a way to go as any. Then you can easily
> add or remove any of the parsing actions. But if you
> are doing some of the same things in each subroutine (e.g.
> parsing the line into tokens), then you might think about
> doing some of the work before passing off the rest of the
> work to the subs.
Oops, I meant to put that into my initial e-mail.
I'm parsing out the lines into a hash table first, and then I'll pass a
reference to the hash table to each of the functions.
Wyatt
--
Wyatt Draggoo
More information about the Oc-pm
mailing list