thaljef/Pinto — pull request #100 by tommystanton (2013-08-08 02:28:18+00:00)
Title: 'pinto manual foobar' gives back an irrelevant manpage

### Issue

This is a very minor annoyance.

Currently, if an invalid command name is given to `pinto`:
- App::Cmd reports that the command name is invalid
- pod2usage() is still executed thereafter, returning the Pod for App::Cmd::Command::commands (which is irrelevant).

### Fix

This pull request implements the following:
- Add a test in `xt/` for the output of `pinto manual ...`, using Test::Trap
- If an invalid command name is specified, return() immediately

### Aftermath

The irrelevant manpage is no longer shown, but some incomplete Usage information is still returned:

$ perl -Ilib bin/pinto manual foobar
Unrecognized command: foobar.

Usage:

...there is a TODO test for this bit.