http://www.perlmonks.org?node_id=11107515

Aldebaran has asked for the wisdom of the Perl Monks concerning the following question:

I have been wanting to post more about scrabble-esque games, but I have an implementation problem that I am still struggling with. I've installed Strawberry perl, as well as git for windows, as well as a batch file from git that is to start Strawberry perl correctly which, unfortunately, I lack a reference for. The one I am going to post here has been altered from the original so as to be more verbose, at least until I get this ironed out.

As I keep working with this script, I keep commenting out the things that I don't need. After grinding this out for a few weeks, more of it is commented out than not:

C:\Strawberry>rem @echo off C:\Strawberry>rem set drive=C:\Strawberry\ C:\Strawberry>rem set drivep= C:\Strawberry>rem If $#\#$==$#~-1drive:~0,-1 C:\Strawberry>rem set PATH=\perl\site\bin;\perl\bin;\c\bin;C:\Windows\ +system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Wind +owsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Strawberry\c\bin; +C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\P +uTTY\;C:\Program Files\Git\cmd;C:\Users\tblaz\perl5\bin;%USERPROFILE% +\AppData\Local\Microsoft\WindowsApps; C:\Strawberry>rem see what values I'm replacing C:\Strawberry>set TERM Environment variable TERM not defined C:\Strawberry>set PERL_JSON_BACKEND Environment variable PERL_JSON_BACKEND not defined C:\Strawberry>set PERL_YAML_BACKEND Environment variable PERL_YAML_BACKEND not defined C:\Strawberry>rem see values other perl stuff on your system C:\Strawberry>set PERL5LIB PERL5LIB=C:\Users\tblaz\perl5\lib\perl5 C:\Strawberry>set PERL5OPT Environment variable PERL5OPT not defined C:\Strawberry>set PERL_MM_OPT PERL_MM_OPT=INSTALL_BASE=C:\\Users\\tblaz\\perl5 C:\Strawberry>set PERL_MB_OPT PERL_MB_OPT=--install_base "C:\\Users\\tblaz\\perl5" C:\Strawberry>rem set env variables C:\Strawberry>set TERM=dumb C:\Strawberry>set PERL_JSON_BACKEND=JSON::XS C:\Strawberry>set PERL_YAML_BACKEND=YAML C:\Strawberry>rem avoid collisions with other perl stuff on your syste +m C:\Strawberry>rem set PERL5LIB= C:\Strawberry>set PERL5OPT= C:\Strawberry>set PERL_MM_OPT= C:\Strawberry>set PERL_MB_OPT= C:\Strawberry>echo ---------------------------------------------- ---------------------------------------------- C:\Strawberry>echo Welcome to Strawberry Perl Portable Edition! Welcome to Strawberry Perl Portable Edition! C:\Strawberry>echo * URL - http://www.strawberryperl.com/ * URL - http://www.strawberryperl.com/ C:\Strawberry>echo * see README.portable.TXT for more info * see README.portable.TXT for more info C:\Strawberry>echo ---------------------------------------------- ---------------------------------------------- C:\Strawberry>perl -e "printf("""Perl executable: %s\nPerl version : + %vd\n""", $^X, $^V)" 2>nul Perl executable: C:\Strawberry\perl\bin\perl.exe Perl version : 5.30.0 C:\Strawberry>if ERRORLEVEL 1 echo. & echo FATAL ERROR: 'perl' does no +t work; check if your strawberry pack is complete! C:\Strawberry>echo. C:\Strawberry>cd C:\Users\tblaz\Documents\evelyn\ C:\Users\tblaz\Documents\evelyn>dir Volume in drive C is Windows Volume Serial Number is ECCC-9917 Directory of C:\Users\tblaz\Documents\evelyn 10/15/2019 12:57 PM <DIR> . 10/15/2019 12:57 PM <DIR> .. 09/10/2019 10:30 PM 16,756 1.atcroft.pl 09/04/2019 11:53 AM 1,963 1.cyr.pl ... 09/07/2019 09:04 AM 287 t — копия.txt 09/07/2019 09:04 AM 287 t.txt 08/20/2019 03:43 PM <DIR> template_stuff 09/01/2019 03:15 PM <DIR> tja 09/11/2019 03:25 PM <DIR> translate-shell 34 File(s) 57,388 bytes 7 Dir(s) 449,137,025,024 bytes free C:\Users\tblaz\Documents\evelyn>cmd \K Microsoft Windows [Version 10.0.17763.805] (c) 2018 Microsoft Corporation. All rights reserved. C:\Users\tblaz\Documents\evelyn>

I would try to use my script for generating the tags for a write-up and would get this:

C:\Users\tblaz\Documents\evelyn>perl 8.monktag.pl INC is C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/St +rawberry/perl/lib Can't locate Win32.pm in @INC (you may need to install the Win32 modul +e) (@INC contains: C:/Strawberry/perl/site/lib C:/Strawberry/perl/ven +dor/lib C:/Strawberry/perl/lib) at C:/Strawberry/perl/lib/Cwd.pm line + 605. BEGIN failed--compilation aborted.

Then I noticed that one of the directories that had this was given my the directory in PERL5LIB. Indeed, when I comment the line out that resets this, then the script works. So I have results, yay, ...but, I would like to pause to ask whether I am doing something stupid that I will regret.

Is PERL5LIB set to null for a reason? Am I setting up my system to be playing a tug-of-war? I have 3 different perls on this system. Should they have a single common place for new modules? In the past (distant), it's seemed like the mingw install starts to fight with strawberry perl and eventually wins, leaving the strawberry perl install outmoded and dusty.

Is being the directory in PERL5LIB how this value entered @INC? Also, am I doing anything useful with the following commands?

C:\Strawberry>set TERM=dumb C:\Strawberry>set PERL_JSON_BACKEND=JSON::XS C:\Strawberry>set PERL_YAML_BACKEND=YAML C:\Strawberry>rem avoid collisions with other perl stuff on your syste +m C:\Strawberry>rem set PERL5LIB= C:\Strawberry>set PERL5OPT= C:\Strawberry>set PERL_MM_OPT= C:\Strawberry>set PERL_MB_OPT=

I hope to get back into less implementation-specific issues soon.

Thanks for your comment,