継承をメモっておく。
#!/usr/bin/perl -w package main; use strict; use warnings; eval{ my $self = Test->new(); print $self->test ."\n"; };if($@){ print "Error:$@\n"; } package Test; sub new { my $class = shift; bless { },$class; } sub test { my $self = @_; return "hello world!"; } 1; __END__