in reply to correct usage of class attributes

The term 'attribute' is a bit ambiguous when it comes to Perl; Perl5 usually uses this term for something a bit different. I'm assuming you're referring to some variables of which there is only one instance per class, and you want some class methods to get and set them. In which case, something like this:
package First; my ($attr1, @attr2, ...); sub get_attr1 { $attr1 } sub set_attr1 { my $class = shift; $attr = shift } sub get_attr2 { @attr2 } sub set_attr2 { my $class = shift; @attr2 = @_ }
Of course there are many ways of doing this; the above is just one example.