Brethern,

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


In reply to Twofer: 'use base' vs 'use'; and SuperSearch by throop

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.