Hi,

I would like to write a method that gets  class name as a parameter and
creates an object of this class with a parameter.

For example, for class MyClass I should have something like:

sub factory
{
my ($className,$param)[EMAIL PROTECTED];

my $returnValue= new {$className}($param);
}

This syntax doesn't work, and I can't find something that works.  Can
someone help me?

Thanks

Yossi

_______________________________________________
Perl mailing list
[email protected]
http://perl.org.il/mailman/listinfo/perl

Reply via email to