in reply to upgrade perl w/same config?

Getting the current configuration into a form useful for a new configuration is easy enough:

/path/to/current/perl -V':.*' | sed -e 's/^/-D/'

This will pick up all of the current configuration options, though, including several you won't want. Library path, API-level settings, etc. that are specific to 5.6.0. So I'd use an exclusionary grep:

perl -V':.*' | egrep -v '(^PERL_|^api_|5\.6\.0)' | sed -e 's/^/-D/ +'

What I don't know is whether you can backtick-feed that Configure on a command line like so:

Configure `perl -V':.*' | egrep -v '(^PERL_|^api_|5\.6\.0)' | sed +-e 's/^/-D/'`

I went through the README, INSTALL and such in the latest source distribution, but I couldn't find a way to feed Configure from a file other than config.sh or Policy.sh. And as I pointed out earlier, you don't want to use all of the elements that would be in config.sh.

--rjray

Replies are listed 'Best First'.
Re: Re: upgrade perl w/same config?
by blakem (Monsignor) on Feb 14, 2002 at 07:15 UTC
    As long as we're talking perl, why not use a perl one-liner instead of sed and grep...
    perl -V':.*' | perl -ne '/^PERL_|^api_|5\.6\.0/ or s/^/-D/, print'

    -Blake