Please help, I am completely baffled by Perl modules.
I need to create a PDF in my survey so I downloaded "PDF-Create-1.43" from CPAN.
I used the CPAN module in Strawberry perl to install it. Then I copied the whole folder "PDF-Create-1.43" into "Test Survey/cgi-bin".
In a survey Question I have:
[% Begin Unverified Perl
require '../cgi-bin/PDF-Create-1.43/lib/PDF/Create.pm';
End Unverified %]
I tested the survey and initially I got errors about missing JSON.pm, ShareDir.pm and Share.pm so I copied these from my Strawberryperl library to "Test Survey/cgi-bin" and that got rid of those errors.
Now I have an error "Can't locate PDF/Image/GIF.pm in @INC" from create.pm line 23.
The line causing the error is "use PDF::Image::GIF;"
But GIF.pm is right there in Test Survey\cgi-bin\PDF-Create-1.43\lib\PDF\Image where it's supposed to be.
Why can't create.pm find it?
I tried adding another require for GIF.pm but no help.
require '../cgi-bin/PDF-Create-1.43/lib/PDF/Image/GIF.pm';
I tried installing the CPAN package in Test Survey/cgi-bin folder directly but I get errors about "illegal directory" when I try to run the Makefile.pl.
Please can anyone help, I've been stuck on this for 3 days now
How to include a perl module from CPAN?
Resolved
1 reply