From what you've shown, it seems Private.pm's only purpose is to load a group of commonly used modules. This was probably done by the original author(s) to avoid retyping all of those 'use ...' statements into each of the Perl scripts.

IMHO, this is usually a bad idea, and can be avoided through better design. If each of the scripts always needs each of these modules, they can most likely have much of their workload, and page displaying functionality done through a common module.

That said, you should also understand clearly what that warning is about. If a module included by Private.pm exports anything (for example, Carp.pm exports carp() and croak()), you will not be able to use it from outside of Private.pm. Instead you will need to fully qualify the name (Carp::carp() for example).

In reply to Re: Private namespace package question by count0
in thread Private namespace package question by apprentice

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.