Re: plugins

2006-06-11 Thread Randal L. Schwartz
> "OROSZI" == OROSZI Balázs <[EMAIL PROTECTED]> writes: OROSZI> How could I implement a system in Perl, in which portions of code (plugins) OROSZI> are loaded dynamically from a given location, and then executed? You might look at any of a few dozen modules in the CPAN that have the word "pl

Re: plugins

2006-06-11 Thread OROSZI Balázs
Xavier Noria wrote: You seem to have some misconception about modules. That do-based approach is very similar to the suggested solution indeed, see perldoc -q require. To be exact, I want a system similar to what GAIM has. Look here: http://gaim.sourceforge.net/api/perl-howto.html How can I a

Re: plugins

2006-06-11 Thread Xavier Noria
On Jun 11, 2006, at 11:16, OROSZI Balázs wrote: Chad Perrin wrote: On Sat, Jun 10, 2006 at 10:53:30PM +0200, OROSZI Balázs wrote: Makefiles are for installing modules, not for using them. If you use the CPAN module management that is provided with common Perl distributions, you shouldn't have

Re: plugins

2006-06-11 Thread OROSZI Balázs
Chad Perrin wrote: On Sat, Jun 10, 2006 at 10:53:30PM +0200, OROSZI Balázs wrote: Makefiles are for installing modules, not for using them. If you use the CPAN module management that is provided with common Perl distributions, you shouldn't have to deal with makefiles even for installation, unle

Re: plugins

2006-06-10 Thread Tom Phoenix
On 6/10/06, OROSZI Balázs <[EMAIL PROTECTED]> wrote: Can I use "use" in the middle of a program? Yes; but I don't think that's quite what you actually want. You probably want to use the require function inside an eval block. Both use and require are documented in the perlfunc manpage. Cheers!

Re: plugins

2006-06-10 Thread OROSZI Balázs
Hi again! According to this documentation: http://world.std.com/~swmcd/steven/perl/module_mechanics.html modules seem to me like static libraries in C. And it looks way too complicated with makefiles and locations and whatever. This is not what I want, I think. -- Greetings, Balázs -- To un

Re: plugins

2006-06-10 Thread OROSZI Balázs
Tom Phoenix wrote: You could use modules. I don't know how to write them and load dynamically. I load things with "use" at the beginning of a program, are modules loaded that way too? Can I use "use" in the middle of a program? Can you point me in some direction where I can begin learning a

Re: plugins

2006-06-10 Thread Tom Phoenix
On 6/10/06, OROSZI Balázs <[EMAIL PROTECTED]> wrote: How could I implement a system in Perl, in which portions of code (plugins) are loaded dynamically from a given location, and then executed? You could use modules. The task is quite simple, all I want the plugins to do is that they get som