Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

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

Let me start with answering question (2). You say that if you want to include package Foo in your distribution and Foo depends on Bar1, Bar2, Bar3, then you don't actually want to include Bar* in your distribution as well ("certainly don't want them all")? That doesn't make any sense to me. Foo declared the dependency with a reason. But maybe I'm misunderstanding you.
In Perl, there is essentially three types of library directories: core-, vendor-, and site lib. They are intended for use by the perl core, the vendor and the site admininstrator respectively. Since you intend to create a binary package of perl, you're the vendor. I suggest you use "cpan" to install your custom packages into the vendor directory and ship them as part of the package.

On some level, I actually like the idea of including extra packages in the base perl distro and then compiling them as part of the core installation. There's a couple of things that can cause trouble with this:

  • It's manual and thus tedious and error prone. In current stable perl releases, there's a bunch of magic scripts and MANIFEST that need updating with the extra files.
  • The module sources (Makefile.PL/Build.PL) may need tweaking so they don't install into the vendor library directories.
  • You have to be careful not to ship such a beast as "perl 5.10.1" because it's not. It's perl 5.10.1 PLUS your libraries. While I'm nitpicking a little, neglecting such distinctions has the potential to cause a lot pain.

In the current development branch of perl, the directory structure has been reorganized to make maintenance of the modules that live both in core and on CPAN easier. Where there used to be a giant lib/ directory and an ext/ directory for XS modules, there is now:

  • lib with the few modules that are needed super-early in the build process.
  • ext with subdirectories each containing a CPAN-distribution like setup of really-tied-to-perl-core modules
  • dist with all the modules that live primarily in core but have a CPAN version published. (Changes go to perl core first and get pushed out to CPAN as appropriate.)
  • cpan with all the modules that are maintained primarily on CPAN and that are simply updated in core

ext, dist, and cpan are organized in subdirectories which mimick an extracted CPAN tarball as closely as possible (usually ignoring the Makefile.PL). Lots of hardcoded information has been eliminated and missing Makefile.PL's are usually auto-generated. Just extracting a CPAN distribution is not likely to just work yet but the amount of fuzzing to get it included should be pretty low nowadays. Note that there is no stable release of perl that features this reorganization. You can experiment with the recent 5.11.X development releases.

Cheers
Steffen


In reply to Re: Building perl for appliances by tsee
in thread Building perl for appliances by Anonymous Monk

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 making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2024-04-23 13:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found