kbperl has asked for the wisdom of the Perl Monks concerning the following question:
I am new to perl and am trying to come up with a main file and bunch of modules to perform some task. When I declare variables as our <variable_name> in one of the module(say a.pm)and when i try to access them in other modules(say b.pm), i am able to do so when I don't use "use strict" and including a.pm in b.pm. So this left me thinking, why do i need to use the exporter module to export the package variables?
Is the reason to use exporter module is to export only a subset of the package variables or is there some other reason for this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need of using Exporter to export package variables
by tobyink (Canon) on Aug 07, 2013 at 07:34 UTC | |
by kbperl (Initiate) on Aug 07, 2013 at 15:59 UTC | |
|
Re: Need of using Exporter to export package variables
by kcott (Archbishop) on Aug 07, 2013 at 05:51 UTC | |
|
Re: Need of using Exporter to export package variables
by toolic (Bishop) on Aug 07, 2013 at 01:55 UTC | |
|
Re: Need of using Exporter to export package variables
by 2teez (Vicar) on Aug 07, 2013 at 05:07 UTC |