There's more than one way to do things | |
PerlMonks |
Re: accessing subroutines of a moduleby vinoth.ree (Monsignor) |
on Apr 19, 2014 at 05:21 UTC ( [id://1082864]=note: print w/replies, xml ) | Need Help?? |
You can explicitly refer to variables and functions within a package using the :: package qualifier. Ex,Here is the below sample module.
Use the above code into you code as,
So here MyModule::funct1() is the package qualifier, to access the function without creating object and exporting function from MyModule namespace into main namespace. All is well
In Section
Seekers of Perl Wisdom
|
|