in reply to accessing subroutines of a module
You can explicitly refer to variables and functions within a package using the :: package qualifier.
Ex,Here is the below sample module.
MyModule.pm package MyModule; use strict; use warnings; sub func1 { your code here... } sub func2 { your code here... } 1;
Use the above code into you code as,
use MyModule; use strict; use warnings; MyModule::funct1();
So here MyModule::funct1() is the package qualifier, to access the function without creating object and exporting function from MyModule namespace into main namespace.
|
|---|