First of all, I want to express my appreciation to this framework. I've been using this framework for a while and I really like this framework because just like the Overview says, "It assumes the responsibility of implementing details that are common to all command-line applications, making it possible for new applications adhering to well-defined conventions". Other than that, adding new commands to this framework is so easy, I just have to fill in some "holes" in the framework (e.g. usage text, option spec and validation, and run() subroutine) and I can focus on the real business logic of the command in the run() and forget about many tedious things. Moreover, with the help of Inline-C and Inline-CPP, I can even write the main business logic of commands in C/C++, call it from the run() subroutine, and link it with my legacy C/C++ production code. This way, I don't have to be a Perl writer to use this Peral CLI framework. I can use this framework for non-Perl languages. That's cool!
As of this writing, the only thing I don't know how to do (and I'm not sure whether it can be done) is how to return error (exit) code to system after a command run is finished. Right now, the run() subroutine in the samples seems to always return output messages for display. Is there any way that, in addition to the output messages, I can also return error (exit) code to the system? I need this capability for scenarios such as test automation - by checking the command exit code my test program can determine its flow accordingly.
Thank you very much!