program.pl
Use Mypackage;
sub test{
print "from test";
}
Mypackage.pl
Package Mypackage;
::test();
This return nothing.
I see several threads about call subroutine in namespace from package, but I want to do the contrary
Print a subroutine in package from main namespace (program.pl)
is this possible ?
BEGIN {}around the sub def and move it before theuse Mypackagestatementpackage, notPackage.useshould be lowercase, andMypackageshould have extensionpm, notpl.