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

Re: Changing Perl compile-time configuration settings

by adamk (Chaplain)
on Feb 20, 2008 at 13:03 UTC ( #669007=note: print w/ replies, xml ) Need Help??


in reply to Changing Perl compile-time configuration settings

Obviously it's sub-optimal to move the distribution every single time. It would be better if it just auto-detected the correct locations.

I've done a little experimentation with this...

Take a look at http://svn.ali.as/cpan/trunk/Perl-Dist/share/vanilla to see my experimental replacements for Config.pm and CPAN/Config.pm (haven't done Config_heavy.pl yet).

You might want to try copying those files into your install.

Of course, you'd have to also create a similarly-modified form of Config_heavy.pl... which you would then of course mail to me :)


Comment on Re: Changing Perl compile-time configuration settings
Re^2: Changing Perl compile-time configuration settings
by Bloodrage (Monk) on Feb 21, 2008 at 02:28 UTC

    Hmm, your solution looks really nifty. I might switch to something like that when I've finished this attempt.

    My solution is to run a script which targets specific config settings for replacement. For CPAN's Config.pm it does a little bit more than s/?:\\strawberry/$new_prefix/ (mostly pointing to some other include files on the flash drive). Perl's Config.pm on the other hand just needs a search/replace done on it. Config_heavy.pl looks like it needs a combination (and to be honest it hasn't been done properly! there's a lot of references to usr/lib and similar unixisms).

    I have a U3 drive because I like UltraEdit32 and the U3 version is pretty much everything you need for non-compiled languages. (I use it for Perl, Javascript, and XHTML).

    Here's the script so far, I'll get to work on it more tomorrow. It's a bit niave in some places (uh, like how I haven't used rename) and needs some of the debugging code stripped out.

    Updated: Now does Perl's Config.pm Updated again: Now does Config_heavy.pl
Re^2: Changing Perl compile-time configuration settings
by Bloodrage (Monk) on Feb 21, 2008 at 09:23 UTC
    Looking at Config_heavy.pl it's going to be a heavyweight combination of the two approaches I've used so far, and at this time of night the code's likely to read like the script from an episode of Deadwood.

      After a good night sleep Config_heavy.pl isn't quite so scary. A s!.:/strawberry!$strawberryDir!g does most of the work, but there are these other options that probably shouldn't be left as they are because they still contain unix paths. This might account for the occasional X:\strawberry\perl\lib/foo/baa mangled paths seen in logs and error reports.

      Exerpts from Config_heavy.pl:
      glibpth='/usr/shlib /lib/pa1.1 /usr/lib/large /lib /usr/lib /usr/lib/ +386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/u +cblib /usr/shlib ' ... locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt +/gnu/include /usr/GNU/include /opt/GNU/include' loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /us +r/GNU/lib /opt/GNU/lib' ... strings='/usr/include/string.h' ... sysman='/usr/man/man1' ... timeincl='/usr/include/sys/time.h ' ... xlibpth='/usr/lib/386 /lib/386'

      Update: Read Config manual page. Some of these are redundant. Others are easily redirected, and should really have been sorted during compile time, i.e. the Configure script didn't really set them correctly prior to compiling. It seems safe to redirect them to appropriate include and lib directories.

        I discovered exactly the same thing, nowhere nearly as scary as it first appeared.

        So I've implemented the auto-detecting version of Config_heavy.pl as well, and added it to the repository.

        I've noticed the unix paths as well, but I'm unsure what the hell the implications of that are...

        Should I go through the makefile before I compile Perl and strip all those out? I dunno yet...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://669007]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2014-08-31 11:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls