Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: Perl XAMPP DB Connect issue (Windows/Strawberry?)

by Polyglot (Chaplain)
on Jan 01, 2023 at 04:53 UTC ( [id://11149249] : note . print w/replies, xml ) Need Help??


in reply to Re^3: Perl XAMPP DB Connect issue (Windows/Strawberry?)
in thread Perl XAMPP DB Connect issue (Windows/Strawberry?)

There is no "portableshell.bat" anywhere in the xampp directory tree. The only thing "portable" is a "Portable.pm" in the "C:\xampp\perl\vendor\lib\" and "C:\xampp\perl\vendor\lib\CPAN\Mini\" directories -- the former having 6,643 bytes as compared to the 388 bytes of the latter. I doubt they are what is needed.

Blessings,

~Polyglot~

  • Comment on Re^4: Perl XAMPP DB Connect issue (Windows/Strawberry?)

Replies are listed 'Best First'.
Re^5: Perl XAMPP DB Connect issue (Windows/Strawberry?)
by swl (Parson) on Jan 01, 2023 at 23:37 UTC

    In that case you can download the batch script from the Strawberry Perl github repo and save it to the top level of the perl distribution on your machine.

    Edit: Although you note in 11149261 that you have already downloaded a portable strawberry perl so should have this file.

    However, if all you want is to add the relevant paths then you can also run this code in your cmd shell before calling any perl code, updating the first path accordingly:

    set ST_PATH=c:\path\to\strawberry_perl_dir set PATH=%ST_PATH%\perl\site\bin;%ST_PATH%\bin;%ST_PATH%\c\bin;%PATH%

    If you are using powershell then the process is the same but the syntax will differ.

    The above process can also be done in a BEGIN block in your perl scripts but that does not help with running other perl scripts not under your control such as Makefile.PL scripts.

    Edit 2: All the above assumes you are working with a Strawberry Perl distribution. The XAMPP distribution does not include the c/bin directory. It also seems to be compiled using MSVC which, if I understand things correctly, means its DLLs will not work with Strawberry Perl since it is compiled using MINGW GCC. So you will likely need to find some way for your application to call out to the Strawberry Perl stack and not the XAMPP perl stack.