There's two things: class attributes and object attributes. The former have the same value for each object of that class, the latter have values specific to each object.
Setting a class attribute $string in method Function10 would be done by simply assigning a value to it, e.g. $string1 = "Hi there";. This assignment is kind of global to all instances of the class.
Setting the attribute of an object would be done by $self->{attr_name} = $attr_vallue;. This assignment is specific to the object you called the method on.
Hope this helps, -gjb-
In reply to Re: correct usage of class attributes
by gjb
in thread correct usage of class attributes
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |