To run the exercices some dependencies are necessary. This project uses cpanm
and local::lib
so that it does not pollute your env with the dependencies it uses (it installs them in the project directory).
To install the dependencies and run the exercices:
- cd to the exercice directory (perl-exercises)
- Execute
install-deps.sh
(orinstall-deps.bat
if using Windows) to install the dependencies. - Run each exercice with
perl n-exercice-name.pl
(exercice 1 is the only one that requires a parameter)
Tip: a clear install of strawberry-perl is able to install all deps successfully using the instructions above.
- If
cpanm
orlocal::lib
aren't available, they can be installed with:
$ cpan App::cpanminus local::lib
- If you're unable to install them for any reason, the dependencies can be installed using just cpan:
$ cpan DBI DBD::mysql Mojolicious Config::Simple
- If the above method was used, lines mentioning
local::lib
in the perl exercice files must be removed.
Exercice 3 depends on extra-files/config.ini
, set your connection string, user and password in it.
The 3514 port is already in use, please stop the service that is using it or edit the perl file to use another port.