We are working on creating a user defined perl module with frequently used perl codes so that we can reuse the code whenever required by loading module 'use' command.
We were able to define a sub routine in perl and it is working fine in that particular question. Now we are trying to place it as a module so that we can call the module and use sub routine directly instead of again copy pasting the sub routine.
we are looking forward for something like a .js file in graphics path used for placing all custom scripts and can be loaded by using <script> tag in header / footer. Is there a way to achieve this for perl codes aswell in graphics folder?
We have created a module but we are not able to retrieve the module or change the working directory.
Below server error is shown while we are trying to load the user defined module.
Server Error: Can't locate lib.pm in @INC (you may need to install the lib module) (@INC contains: C:/.../SSI Web/LocalWeb/htdocs/8_4_8/Template/cgi-bin C:\Users\admin\AppData\Roaming\Sawtooth Software, Inc\SSI Web\LocalWeb\htdocs\8_4_8\Template\cgi-bin) at (eval 86) line 2, <GEN2> line 18. BEGIN failed--compilation aborted at (eval 86) line 2, <GEN2> line 18.
SSIWebVersion= 8_4_8 : Script: use lib qw(GRAPHICSPATH()); use ListRand; return GroupRand(1,2); params= Password=>test, SampleConst=>4, Username=>test,
Is it possible to define and load perl modules from the graphics folder of the project?
How can we change the Cwd (Current working directory) in the perl in SSI Web 8.4.8?