Hi!

How could I implement a system in Perl, in which portions of code (plugins) are loaded dynamically from a given location, and then executed? Lets assume I have a main program main.pl and it is loading the plugins from a given directory, with names like plugin1.plug, etc., that are also perl files. The task is quite simple, all I want the plugins to do is that they get some data, work with it, and give back some data.

It is important, that main.pl will get the list of plugins dynamically, so adding a new one should be a copy to the given directory and no modification of main.pl It would also be important, that if a plugin fails to load (syntax errors, etc.) then the main program shouldn't crash, but go on, discarding the plugin, and writing some error to screen.

Is there a good well-known way to accomplish this? Has anybody done something like this?

Thanks in advance.

--
Greetings,
  Balázs

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to