- SEE ALSO
- COPYRIGHT AND LICENSE
Games::Dukedom::Signal = provide "interrupts" to drive the state-machine
use Games::Dukedom; my $game = Games::Dukedom->new(); $game->throw( 'This is a simple message' ); $game->throw( msg => 'This is also a simple message', ) $game->throw( msg => 'Do you want to be King? ', action => 'get_yn', ) $game->throw( msg => 'Are you sure [Y/n]? ', action => 'get_yn', default => 'Y' )
This module is used to signal the application code that a display or input action is needed. This is accomplished by means of the Throwable role.
All attributes have read-only accessors.
Holds a message to be presented to the user by the caller, if present.
Tells the caller what action should be taken before re-entering the main state-machine loop, if present. Currently takes one of the following values:
Indicates that no action is needed other than displaying any message that is present.
Indicates that the caller should supply a "y" or "n" response in
Indicates that the caller should supply a numeric response in
Provides a default response, if present, that may be used if desired to satisfy the requested action.
This method will provide a string representing the error, containing the error's message.
Jim Bacon, <firstname.lastname@example.org>
Copyright (C) 2014 by Jim Bacon
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version or, at your option, any later version of Perl 5 you may have available.