Look into exporting. Basically, it's an easy way to tell a module, when used, to place its symbols in the namespace of the module which uses it.
So basically, you'd convert your requires into uses, and add a few lines of code to the top of each of your "libraries" (now called "modules" by the changes you'd be making).
I know it's not exactly what you're asking, but it's an approach that leads you down the direction you seem to be heading, so that's good. Also, it's generally the way that this sort of thing is done, these days (exporting symbols from one namespace into another).
------------
:Wq
Not an editor command: Wq
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|