package User; use strict; use warnings; use base 'Class::Accessor'; # User->follow_best_practice; # get_* und set_* User->mk_accessors(qw/name passwort duration/); sub add_duration {  $_[0]->duration(    $_[0]->duration() + $_[1]  ); } 1;