package sheep; use strict; sub new { my $proto=shift; my $class=ref{$proto} || $proto; my $self={}; bless($self,$class); return $self; } sub bleet { my $self=shift; return 'Baaaa!'; } package main; use strict; use sheep; my wolf=new sheep; print wolf->bleet()."\n";
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |