Hi,I just start to learn the OOP part of perl. I saw there is some package ObjectTemplate that could help you to construct a class. and in the package that it generates, some Syntax just confuses me, could you give me some detailed explanation, thanks:
sub one { # Accessor ...
my $name = ref($_[0]) . "::_one";
@_ > 1 ? $name->[${$_[0]}] = $_[1] # set
: $name->[${$_[0]}]; # get
}
especially what dose it mean by "set"&"get".
Thanks
sub one { # Accessor ...
my $name = ref($_[0]) . "::_one";
@_ > 1 ? $name->[${$_[0]}] = $_[1] # set
: $name->[${$_[0]}]; # get
}
especially what dose it mean by "set"&"get".
Thanks