And, just in case you're wondering, the doc is here (you can also use perldoc base).

From a certain point of view, the question is not correct - in both cases, the keyword use means exactly the same thing.

1. use <package> <list of items>; 2. use base <list of parent modules>;
Do you see it? The second form is a specialisation of the first, where you're actually using package base, which you'll find among other CORE package files in your library. So, you'll be able to find a base.pm file, which will enlighten you with the real mechanism under the hood.

The same applies when you use warnings, or use strict: you're asking to include the corresponding file, which encapsulates the requested functionality. These kind of modules are called pragmas.

One final note. When you write:

use <package> qw();
you're also specifying an empty list of items. This list is usually used by the module to understand what functions should be exported and what not, so you're asking to import nothing. This semantic is consensual for "normal" modules but not mandatory; as a matter of fact, pragmas use the list for completely other purposes (e.g. the base pragma grabs the list of ancestors from it).

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.

In reply to Re: How to use a 'Use' by polettix
in thread How to use a 'Use' by palette

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.