http://qs321.pair.com?node_id=612352


in reply to declaring accessor methods from a list

As AK108 pointed out, Class::Accessor is a nice module to do what you want and like it a lot as well. With it, your code would turn to be:
package Bro::Doug ; use strict ; use warnings ; use base qw(Class::Accessor); __PACKAGE__->mk_ro_accessors( qw(one two three) ); 1;
and you will get the accessors and the new constructor for free.