in reply to Dynamic loading of object-oriented plugins
Neat idea, btw.package foo; my $foo_thing = foo->new; &::register_plugin($foo_thing); sub new { return bless {}, shift } sub hello { print "Hello from foo!\n" } 1; package main; sub register_plugin { push @plugins, shift; } foreach $plugin (@plugins) { $plugin->hello; }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|