PsychoSpunk has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (object-oriented programming)
I'm wanting to provide a bit of determinism to the
constructor method, and was wondering if I can simply make
sub new { my $value1, $value2 = @_; ... }
and
Am I looking for too much here? Or is there just no way to really effectively pull this one off other than putting it in one constructor that does the logic and passes off to other subs based on the values it gets? Thanx. Mikesub new { my $only_value = shift; ... (not the same as above ...) }
Originally posted as a Categorized Question.
Back to
Seekers of Perl Wisdom