Answer the question
In order to leave comments, you need to log in
How to install a module and write the path to @INC?
Good day of the day! you need to run a perl script - mailer.pl
installed Strawberry Perl. installed the necessary modules from CPAN.
I run the script.
Error:
Code
1 #!/usr/bin/perl
2
3 #use forks;
4 use threads;
5 use threads::shared;
6 use strict;
7 use warnings;
8 use Data::Dumper;
9 use lib::file;
Answer the question
In order to leave comments, you need to log in
It is not entirely clear what specific module is being referred to, either about lib::file, or about the file module, which lies in the lib directory. I will go with the second option.
There are several ways to include the required library:
BEGIN { unshift @INC, 'c:\mailer\lib'; }
# или
use lib qw( c:\mailer\lib );
# или
use lib::abs qw( c:\mailer\lib );
# или
use lib::abs qw( lib );
# ...еще какая-то магия
#!/usr/bin/perl
#use forks;
use threads;
use threads::shared;
use strict;
use warnings;
use Data::Dumper;
use lib::abs qw( lib );
use file;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question