Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Echoing some other ideas here, I recommend putting all your utility code into modules in your own namespace (in a version-controlled directory) and then:

  1. Quick and dirty option: add a symlink to your modules into an existing perl include path
  2. More robust option: use Dist::Zilla to build actual packages of your modules, which you might even decide to publish on cpan

The first option will get you up and running the quickest, and even help transfer your modules around (along with bug fixes for your modules) from computer to computer with the help of git. You use the existing perl lib path, so no need to clutter your scripts with "use lib ..." boilerplate. If package management looses your symlink you can put it back easily. You can also add your modules to every lib path of every perl you use while only maintaining one copy.

Later, when you find time to learn Dist::Zilla and clean up your APIs, you can make them into official perl packages which you can install into system-perl or into per-user perlbrew using "cpanm MyPackage-version.tar.gz".


In reply to Re: Best practices for local libraries by NERDVANA
in thread Best practices for local libraries by Barrabas

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



  • 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.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-24 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found