in reply to Initial Variables

I find it's easy to make a method like that as long as you're importing hash-style parameters. For example:
sub new { my $class = shift; my $self = { @_ }; return bless($self, $class); } # ... my $test = Foo->new(handle => $dbh); my $handle = $test->{handle};
If you're paranoid about what kind of data someone's going to pass in, you can always filter it.
my @imports = qw [ foo bar ]; sub new { my ($class, %params) = @_; my %self; @self{@imports} = @params{@imports}; return bless(\%self, $class); }
This will restrict parameters to those in the import list. You could extend this to produce errors, of course.