in reply to Re: OO Parser Class with Callbacks - Confusion
in thread OO Parser Class with Callbacks - Confusion
You know, I think you might have nailed it. Intuitively that seems correct.
I did it this way to divide the parsing of the input file from the format of the output. So the backend would say "I've found a glark element", and frontend A may say "Ignore it", while frontend B may say "Concatenate it with the preceding output".
The plan was for the client to say:
my $obj = Backend->new(frontend=>FrontendClass);
But, as you point out, far more sensible is for them to say:
my $obj = Frontend->new;
Then to have Frontend use Backend. :-) Thank you very much!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: OO Parser Class with Callbacks - Confusion
by Anonymous Monk on Dec 04, 2006 at 04:05 UTC |