- or download this
use Foobar;
...
Foobar::some_method();
}
- or download this
my $f = Foobar->new();
$f->some_method();
- or download this
sub class_or_instance
{
...
Foobar->class_or_instance() # passes class name "Foobar" in as @_[0]
my $f = Foobar->new();
$f->class_or_instance(); # passes object $f in as @_[0]
- or download this
Foobar::class_or_instance('blech');