#!/bin/bash -
# File: install-cpanm-recommended-modules.sh
# Copyright (c) 2018-2019 Justin Hanekom
# Licensed under the MIT License
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Setup a safe Bash scripting environment
set -o errexit # Exit immediately if an error occurs
set -o noclobber # Do not allow files to be overwritten via redirect
set -o nounset # Do not allow unset variables
# Set the exit code of a pipeline to the rightmost non-zero on error
set -o pipefail
#set -o xtrace # Trace script execution (i.e., debug mode)
# Set the internal field separator to newline or tab, but not space
IFS=$'\n\t'
# Setup a secure Bash scripting environment by: setting a secure path;
# clearing all aliases; clearing the command path hash; setting the hard limit
# to 0 to turn off core dumps; and setting a secure umask
PATH=$(PATH='/bin:/usr/bin' getconf PATH); export PATH
builtin unalias -a
hash -r
ulimit -H -c 0 --
UMASK=002
umask ${UMASK}
cpanm -i Test::Pod Test::Pod::Coverage autodie \
Attribute::Types Class::Std Class::Std::Utils \
Config::General Config::Std Config::Tiny Contextual::Return \
DateTime DBI Devel::Size Exception::Class File::Slurp Filter::Macro \
Getopt::Clade Getopt::Euclid HTML::Mason Inline \
IO::InSitu IO::Prompt Lexical::Alias List::Cycle Log::StdLog \
Module::Build Module::Starter Module::Starter::PBP only \
Parse::RecDescent \
Perl6::Builtins Perl6::Export::Attrs Perl6::Form Perl6::Slurp \
POE Readonly \
Regexp::DefaultFlags Regexp::Assemble Regexp::Common Regexp::MatchContext \
Smart::Comments Sort::Maker Sub::Installer \
Text::Autoformat Text::CSV Text::CSV::Simple Text::CSV_XS \
XML::Parser YAML \
Modern::Perl Moose \
Data::Alias
# vim: set filetype=sh smartindent autoindent smarttab expandtab tabstop=4 softtabstop=4 shiftwidth=4 autoread