Is there a neat way of dynamically loading in the appropriate control
subclass? Something proven and widely used.
For what it's worth, I use the eval trick too. Although it may seem a
little clunky, I believe it is proven and widely used. The DBI.pm
module uses code like this to load in the
On Wed, 29 May 2002 09:22:00 -0400
Aaron Ross [EMAIL PROTECTED] wrote:
: Is there a neat way of dynamically loading in the appropriate control
: subclass? Something proven and widely used.
:
: For what it's worth, I use the eval trick too. Although it may seem a
: little clunky, I believe
Rafiq Ismail (ADMIN) wrote:
Now my problem is that I have to assign which
Subclass I want to instantiate, based on the script and params.
So, you're asking how to map URLs to perl modules? Is there some reason
you aren't simply using httpd.conf or Apache::Dispatch? In my last MVC
design,
Ello,
On 29 May 2002, Randal L. Schwartz wrote:
Rafiq == Rafiq Ismail (ADMIN) [EMAIL PROTECTED]
writes:
Rafiq Is there a neat way of dynamically loading in the appropriate
control
Rafiq subclass? Something proven and widely used.
Load the file with a require, and then just call the
Dave Rolsky wrote:
On Wed, 29 May 2002, Perrin Harkins wrote:
There's no good reason to do an eval 'use'. Use require instead, and
import if you need to (but most people don't).
Actually, there is. This code:
my $module = 'Foo::Bar';
require $module;
is not the same as
Rafiq Ismail (ADMIN) wrote:
I'm not so keen on loading all the inheriting classes into memory
beforehand
You really should do that, because it will save overall memory by
increasing the amount of memory that's shared. All modules should be
loaded during startup in the parent process.
It's
On Wed, 29 May 2002, Perrin Harkins wrote:
There's no good reason to do an eval 'use'. Use require instead, and
import if you need to (but most people don't).
Actually, there is. This code:
my $module = 'Foo::Bar';
require $module;
is not the same as this:
require Foo::Bar;
If