##########################################################################################
# WARNING & ERROR CODES
##########################################################################################

W: Warning
E: Error

CV: Code Value
PV: Pointer Value (String)
IV: Integer Value
NV: Number Value (Float)
RV: Reference Value

PA: Parse
IN: Interpret
CO: Compile
EX: Execute
AL: Algorithm

PL: Perl Interpreter
PC: Perl::Critic Analyzer
RP: RPerl Compiler

SO: Sort
BU: Bubble


##########################################################################################
# PERLTIDY 
##########################################################################################

$ mv /usr/share/perl5/Perl/Critic/Policy/CodeLayout/RequireTidyCode.pm \
    /usr/share/perl5/Perl/Critic/Policy/CodeLayout/RequireTidyCode.pm.orig
$ ln -s PATH_TO_RPERL/lib/Perl/Critic/Policy/CodeLayout/RequireTidyCode.pm \
    /usr/share/perl5/Perl/Critic/Policy/CodeLayout/RequireTidyCode.pm

# MUST HAVE Perltidy v20121207 OR LATER
# All RPerl code is run through Perl::Tidy configured for Perl Best Practices
$ perltidy -pbp --ignore-side-comment-lengths --converge


##########################################################################################
# PERLCRITIC
##########################################################################################

# MUST HAVE Perl-Critic v1.120 OR LATER
# All RPerl code is run through Perl::Critic severity level 1 (brutal)
$ perlcritic --brutal

# Perl::Critic & Eclipse EPIC Integration Fix
$ cd PATH_TO_CRITIC
$ mv perlcritic perlcritic.old
$ ln -s PATH_TO_RPERL_GITHUB/script/3rd_party_debugging/perlcritic ./perlcritic
# Eclipse -> Window -> Preferences -> Perl EPIC -> Perl::Critic -> Custom Location
# PATH_TO_LAMPUNIVERSITY_GITHUB/bin/perlcritic_eclipse.sh


##########################################################################################
# CPAN DISTRIBUTION
##########################################################################################

# Makefile.PL uses ExtUtils::MakeMaker
$ vi lib/RPerl.pm
    # set $VERSION
$ rm -Rf ~/perl5; curl -L cpanmin.us | perl - -l $HOME/perl5 App::cpanminus local::lib
    # optionally create clean ~/perl5 for local::lib single-user installation
    # remember to re-enable Perl::Critic & Eclipse EPIC Integration Fix above
$ make distclean
$ rm RPerl*.tar.gz
$ perl Makefile.PL
$ make manifest
    # review MANIFEST contents
$ vi MANIFEST.SKIP
    # update with new files to exclude from CPAN
    # correlated with Makefile.PL & .gitignore
$ make manifest
    # review MANIFEST contents again
$ cpanm --installdeps .; make disttest
	# optionally install deps and test before creating tarball
$ make dist
    # produces tarball output
$ cpanm ./RPerl-VERSION.tar.gz
    # install from local tarball, ensure tests run & installation is successful
$ which rperl
$ rperl -v -d ~/FOOFILE  # NEED FILENAME
$ perl -e 'use RPerl;'
    # ensure RPerl runs correctly
$ cpanm CPAN::Uploader
$ cpan-upload -v -u WBRASWELL --dry-run RPerl-VERSION.tar.gz
