hi there,

I find a difficulty when writing the constructor which may has dynamic
and non fixed number of properties, say we want to construct a new
class Account,

package Account;

sub new {
 my $class = shift;
 my $self = { currency_us=>undef,
                    currency_fr =>undef,
 };
 bless $self, $class;
 return $self;
}

If we want to create new object with more other contries' currency and
don't want to modify the code, for example, get more other contries'
name from database, how to write my constructor method and it can live
with the dynamic database?


--
perl -e 'print unpack(u,"62V5N\"FME;G\!E<FQ`9VUA:6PN8V]M\"[EMAIL PROTECTED]
")'

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to