Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Generate Config.pm for distribution in a package?

by jptxs (Curate)
on Apr 04, 2005 at 18:57 UTC ( #444765=perlquestion: print w/ replies, xml ) Need Help??
jptxs has asked for the wisdom of the Perl Monks concerning the following question:

Hello esteemed monks, long time no post.

My company has long distributed perl with our software package (a common practice). We ship a semi-complete default build with a semi-full compliment of modules. For reasons that will soon be obvious, we've always avoided modules that need Config.pm and avoided distributing Config.pm as well. Of course, this is due to the fact that if we build on machine A, package up the perl install and it's installed on machine B, then the Config.pm is invalid.

As with most things in software, this seemed like a good idea until it wasn't. Now I need to use a module that does require Config.pm (actually I need a module that needs a module that needs a module that needs a module that needs Config.pm - LWP::Simple->IO::Socket::INET->IO::Socket->IO->XSLoader->Config, for the curious).

I have been trying to find a way to build out a Config.pm on the fly (without doing a full compile and install, which is verboten). I could even see just building a partial Config.pm with only those items I need in it, which would seem to be a good idea on the surface since I could avoid items of great potential conflict. The problem with the partial Config.pm is that I've not yet determined how many of those items I need are likely to be in conflict on similar plaforms (I can live with one per platform {Solaris, Linux, AIX}, but one per version {Solaris8 vs Solaris9} would a large amount of work). I know I could brute force build out a bunch of Config.pm files and then use tricks to call the right one, but that's a lot of overhead up front and is still not garunteed to work in every case.

Ideas?

Thanks

We speak the way we breathe. --Fugazi

Comment on Generate Config.pm for distribution in a package?
Re: Generate Config.pm for distribution in a package?
by meredith (Friar) on Apr 06, 2005 at 06:35 UTC

    Okay, I'm afraid I don't understand your question here. (By the lack of responses, I reckon you've confused others, too. :) If you are building perl for bundling with your product targetted to, say AIX, won't you implicitly get the correct Config.pm for inclusion with the AIX build?

    mhoward - at - hattmoward.org

      Config.pm seems to be more subtle than that. It makes distinctions between different shades of AIX (different kernel settings, paramters, compilers, etc.) that the larger software package we distribute does not. In other words, Config.pm demands a greater level of specificty than any other part of our software package. So even if we generated a Config.pm for each server we build on in our labs, that would not cover the diversity of servers our software may eventually be installed on. I hope that helps clarify.

      It's starting to seem that there is no solution other than a brute force one (genrating a great deal of possible Config.pm files and putting them all in a directory structure that's addressed dynamically based on local configuration).

      We speak the way we breathe. --Fugazi

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://444765]
Approved by Corion
Front-paged by TStanley
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2014-10-31 19:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (223 votes), past polls