mdorman/Module-Build-Service — pull request #3 by mdorman (2012-11-28 20:34:39+00:00)
Title: Rework 'interact'.

The implementation of the 'interact' command was always a little
unfortunate, being assymetric with respect to how ACTION_test worked:
you don't override it by providing ACTION_interact, you don't have to
call SUPER::ACTION_interact, and, ultimately, it makes you write your
own "pause" function (this may be a feature, not a bug ;).

I recently realized a way to fix all of this that should, I think, be
backward compatible.

Module::Build::Service now provides a default 'interact' sub, that
just pauses in the blandest possible way.

If you already have an 'interact' command in your subclass, it will
simply call that one.

Or, and this is the preferred strategy going forward, your subclass
can have an ACTION_interact sub that sets anything up that needs
doing, then calls $self->SUPER::ACTION_interact, which will wrap that
default 'interact' sub.

So your ACTION_interact sub can mirror your ACTION_test routine very
closely, and doesn't have to worry about prompting.