in reply to correct usage of class attributes
Your first is wrong (it's setting the value for the key "string1" in your instance), the second is actually setting $string2, and the third is similarly wrong (again mucking with the instance).
You might want to look at Class::MethodMaker which will write accessors for you.
|
|---|