This is the object constructor used in perltoot. I put it in my editor so I don't have to retype it all the time.
sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; bless ($self, $class); return $self; }
Back to
Cool Uses for Perl