【发布时间】:2014-01-14 00:47:41
【问题描述】:
有没有办法在 perl 中获取特定类的对象?
例子:
use <class1>;
use <class2>
sub Main {
my $call1 = <class1>->new(<ARGS>)->(<Routine call>);
my $call2 = <class1>->new(<ARGS>)->(<Routine call>);
my $call3 = <class1>->new(<ARGS>)->(<Routine call>);
.
.
.
my $call4 = <class2>->new(<ARGS>)->(<Routine call>);
}
能否获取<class1> 的对象?
$call1
$call2
and
$call3
【问题讨论】: