I still wonder about Config, though.
It's quite easy to change %Config values - and the same method works on all systems.
Just create a file named (say) New_Config.pm:
package New_Config;
use Config;
my $new = tied %Config;
$new->{make} = 'dmake';
$new->{byteorder} = '43215678';
# Specify as many as you like
1;
Then you'll see:
C:\>perl -V:byteorder
byteorder='12345678';
C:\>perl -MNew_Config -V:byteorder
byteorder='43215678';
C:\>perl -V:make
make='gmake';
C:\>perl -MNew_Config -V:make
make='dmake';
The first I became aware of this was with
Mattia Barbon's EU::FakeConfig.
This was very useful as it allowed the use of gcc toolchains to build and install XS modules on perl's built using an MSVC toolchain. (This was back in the day when ActiveState were providing perl's built using MSVC-6.0.)
I haven't checked to see whether this technique is utilised by Strawberry Perl in achieving its relocatability.
IIRC, on Windows some Config keys can be altered by editing Config.pm and Config_heavy.pl - but there are also keys that, to my knowledge, can only be changed via this "tied hash" approach.
Cheers,
Rob
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.