throop has asked for the wisdom of the Perl Monks concerning the following question:
A question and a question about the question.
What is the difference between 'use base (Exporter);' and 'use Exporter;'? I am modifying a CPAN module, Module::Grapher . In a previous thread, I was kindly advised to import a function and a hashref, rather than addressing them with an unweildy pacakge prefix. I found that the code says 'use base (Exporter);' but doesn't actually export anything. What I'm used to, and what I found in the Simple Module Tutorial, is 'use Exporter;'? Is there a difference?
Meta-Question: I tried to SuperSearch for 'use base'. Alas many of the answers I received looked like
Re^3: confused about reading from database using an array
Was there a better way for me to search?
The 'use base' issue thread helped a little. But I'm still confused. The Module::Dependency code is object-oriented — and are some of the modules it uses are. Can I leave 'use base (Exporter)' in place and add 'use Exporter;'? Or should I comment it out?
throop
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Twofer: 'use base' vs 'use'; and SuperSearch
by Joost (Canon) on Dec 14, 2006 at 15:26 UTC | |
by jbert (Priest) on Dec 15, 2006 at 10:44 UTC | |
|
Re: Twofer: 'use base' vs 'use'; and SuperSearch
by jdporter (Paladin) on Dec 14, 2006 at 15:29 UTC | |
|
Re: Twofer: 'use base' vs 'use'; and SuperSearch
by adrianh (Chancellor) on Dec 14, 2006 at 16:27 UTC | |
|
Re: Twofer: 'use base' vs 'use'; and SuperSearch
by leocharre (Priest) on Dec 14, 2006 at 17:56 UTC | |
|
Re: Twofer: 'use base' vs 'use'; and SuperSearch
by jbert (Priest) on Dec 15, 2006 at 10:49 UTC | |
|
Re: Twofer: 'use base' vs 'use'; and SuperSearch
by sgt (Deacon) on Dec 15, 2006 at 09:55 UTC |