#!/usr/bin/env bash
# This is all required for working with module installation from the shell.
-# And later to run tests and have a test driven application development, setup.
-#
+# And later to run tests and have a test driven application development, properly setup.
+# Note - This operation of installing modules can run a long time.
+@
+# It requires to be in sudo to be run for some old modules.
+# These will be placed here ones found required there to be installed.
+# If have installed an utility like brew to switch different perl version,
+# then locally to users home is best to install separatelly required cpann modules if switching versions.
+# This one is than linked to the brew to find the modules.
+# Note - Without perlbrew default local is something like: "perl.perlInc": ["/home/will/perl5/lib/perl5","/usr/share/perl/5.38.2/"],
+# in .config/Code/User/settings.json for vscode.
# If using perlbrew with the test, sometimes this setup is required from the shell:
# $ export PerlCNF_TESTS_PATH=tests
# And run test with:
# $ perl tests/testAll.pl#
# As latert Perl v5.36+ version should work fine without the install of local::lib.
#
-perl -MCPAN -e 'CPAN::install(local::lib)'
-perl -MCPAN -Mlocal::lib -e 'CPAN::install(LWP)'
-perl -MCPAN -Mlocal::lib -e 'CPAN::install(Text::Levenshtein::XS)'
-perl -MCPAN -Mlocal::lib -e 'CPAN::install(Term::Term:)'
-perl -MCPAN -Mlocal::lib -e 'CPAN::install(Term::ReadKey)'
-./install_cpan_modules_required.pl
+sudo perl -MCPAN -e 'CPAN::install(local::lib)'
+sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(LWP)'
+sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(Text::Levenshtein::XS)'
+sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(Term::Term:)'
+sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(Term::ReadKey)'
+sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(Exception::Class)'
+sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(Syntax::Keyword::Try)'
+sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(JSON::XS)'
+sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(DBI)'
+sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(DBD::SQLite)'
+# sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(DBD::Pg)'
+# sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(DBD::mysql)'
+sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(CGI::Session)'
+
+sudo apt install libanyevent-perl libclass-refresh-perl libcompiler-lexer-perl \
+ libdata-dump-perl libio-aio-perl libjson-perl libmoose-perl libpadwalker-perl \
+ libscalar-list-utils-perl libcoro-perl
+
+
+sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(Coro)'
+sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(IO:AIO)'
+sudo perl -MCPAN -Mlocal::lib -e 'CPAN::install(Perl::LanguageServer)'
+
+#./install_cpan_modules_required.pl