fritz1968 has asked for the wisdom of the Perl Monks concerning the following question:
I get to troubleshoot someone else's code. (yeah!). Anyhoo, I am trying to make sense of the following code:
package my_wsdl; sub new { my $class = shift; my $self = { _id => shift, _client => shift, _externalID => shift, _externalParentId => shift, _provider => shift, _action => shift, _priority => shift, _actionTime => shift, _state => shift, _result => shift, _locked => shift, _lockedTimes => shift, _sid => shift, _domain => shift, _samAccountName => shift, }; bless $self, $class; return $self; } sub setID { my ( $self, $id ) = @_; $self->{_id} = $id if defined($id); return $self->{_id};
Specifically, in human terms, what does the following line mean?
Thanks, Frank$self->{_id} = $id if defined($id);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What does this mean?
by moritz (Cardinal) on Aug 20, 2012 at 19:51 UTC | |
|
Re: What does this mean?
by Perlbotics (Archbishop) on Aug 20, 2012 at 19:55 UTC | |
by tobyink (Canon) on Aug 20, 2012 at 22:24 UTC | |
|
Re: What does this mean?
by bulk88 (Priest) on Aug 20, 2012 at 22:28 UTC | |
|
Re: What does this mean?
by Anonymous Monk on Aug 20, 2012 at 20:05 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |