Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I am Glad you like CLI::Framework (I'm the author). Just a couple of things worth mentioning... Those who are interested can see CLI::Framework design goals and features for a concise list of what is offered by "CLIF." This feature list is, in a nutshell, why I created CLIF instead of using another module intended to assist in building command-line applications. There are no "conflicts between application slots and command slots." Application objects and command objects can share state using the cache. Commands are aware of the cache, but they are generally unaware of the application (metacommands are an exception). This is by design to encourage decoupling commands from applications. Commands could conceivably be used and reused independently from applications. Your commands will use $self->cmd_method() to call a command method and usually should not directly call app methods. However, when necessary (as in some of the built-in commands), they'll do so using $self->get_app()->app_method(). Thus, command methods are called via command objects and if a particular command is application-aware, it has a get_app() accessor which returns the app object. See the definition of a Metacommand and the POD for Command::Meta. Finally, be aware that I'm still standing behind the distribution. It's still relatively young and has some rough edges that I plan to polish. I'm doing this "on the side" and primarily for myself, but if anyone is using it and has any requests or suggestions, let me know. I'd still like to make it a nice solution for everyone's needs! One additional module to add to your list: App::CLI. Maybe I'm biased, so I'll let you draw your own conclusions. In reply to Re: scripting frameworks - a cursory glance
by krazyk
|
|