Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Generic front end with back-end drivers?

by samtregar (Abbot)
on Feb 12, 2008 at 18:13 UTC ( [id://667639]=note: print w/replies, xml ) Need Help??

in reply to Generic front end with back-end drivers?

This should be pretty easy to do. Put each parser in a separate package with a common interface. Then in your front-end class, do:

if ($type eq 'foo') { $parser = "Parser::Foo"; } elsif ($type eq 'bar') { $parser = "Parser::Bar"; } else { die "What the heck is $type?"; } eval "use $parser" or die "Can't load $parser: $@";

Then you make calls to your parser via the package name:



Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://667639]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-20 10:10 GMT
Find Nodes?
    Voting Booth?

    No recent polls found