set method's parameter is replaced $self by $pkg.