Ignore ecal critic. It is safe because only evaluated trusted data source file.
Add explicit return statement to each subroutine to prevent inner data leackage.
Add script to check code with perlcritic.