Subject: | Initiate attributes |
Date: | Tue, 17 Aug 2010 12:30:00 -0400 |
To: | bug-Object-InsideOut [...] rt.cpan.org |
From: | "Yang, Tao" <tao.yang [...] bankofamerica.com> |
Hello,
I have three attributes defined as:
my @tier_name : Field : Arg('Name' => 'tier_name') ;
my @subnet : Field : Arg('Name' => 'subnet') ;
my @action : Field : Get(action) ;
In my init :Init(), I pass in a args reference as below:
$args = {
tier_name => 'sl-1',
action => 'show',
subnet => '127.0.0.1',
};
I am trying do something like this:
for $key (keys %$args) {
$self->set( \@$key, $args->{$key});
}
In other word, can the variable name itself be a variable? I always gets
error. I am not sure if this is supported in object:insideout.
Thanks