for a Moose package, I am trying to create a object in Perl (non-moose) and then trying to access a method outside. Code to explain this situation is here.
package person;
{
use Moose;
sub test {
print "my test print";
}
}
package people {
use person;
my $obj = person->new();
}
$people::obj->test()
I am getting following Error on executing this perl code.
Can't call method "test" on an undefined value at test.pm
Am I missing anything here ?