bin/distmap should be only a command line parser that calls a different class in the lib/perl5/site_perl/DistmapLib.pm which do the actuall work. This should be done as following:
[ ] bin/distmap should have a proper POD for usage (see #65)
[ ] bin/distmap should just parse the options, check the mandatory parameters and other command line validation (e.g., valid ReadTools provided) and then delegate to the library.
[ ] the library should have a method to launch the real distmap work and return an error code (no library component should exit - as some Utility sub-routines do.
[ ] bin/distmap should take the returned value, and exit properly (printing help, just summary, errors, etc.)
This will make more consistent keeping the command line and POD usage in sync, and to make sure that the control flow for the application (parsing, executing, exiting) depends only on distmap, and the actual work is done by the library.
bin/distmap
should be only a command line parser that calls a different class in thelib/perl5/site_perl/DistmapLib.pm
which do the actuall work. This should be done as following:bin/distmap
should have a proper POD for usage (see #65)bin/distmap
should just parse the options, check the mandatory parameters and other command line validation (e.g., valid ReadTools provided) and then delegate to the library.Utility
sub-routines do.bin/distmap
should take the returned value, and exit properly (printing help, just summary, errors, etc.)This will make more consistent keeping the command line and POD usage in sync, and to make sure that the control flow for the application (parsing, executing, exiting) depends only on distmap, and the actual work is done by the library.