use warnings; use strict; use feature 'say'; use lib '.'; use Obj qw(foo); my $o = Obj->new; say $o->foo(2, 2); say Obj::foo(2, 2); say foo(2, 2);