package [% package %]; =begin hackers [% autogenerated_warning %] =end hackers =head1 NAME VCP::UIMachines - State machines for user interface =head1 SYNOPSIS Called by VCP::UI =head1 DESCRIPTION The user interface module L is a framework that bolts the implementation of the user interface to a state machine representing the user interface. Each state in this state machine is a method. =head1 METHOD =over =cut use strict; [%- FOR s = machine.states -%] [%- SWITCH s.class_ids -%] [%- CASE "entry_class" -%] =item [% s.id %] [% s.description | trim %] Next state: [% s.arcs_from.to %] =cut sub [% s.id %] { return '[% s.arcs_from.to %]'; } [%- CASE "prompt_class" -%] =item [% s.id %]: [% s.name %] [% s.description | trim %] Valid answers: [% FOR a s.arcs_from -%] [% a.description %] => [% a.to %] [% END %] =cut sub [% s.id %] { my ( $prompter ) = @_; my $prompt = '[% s.name %]'; my @valid_anwsers = ( [% FOR a s.arcs_from -%] [% a.description %] => [% a.event.api %] [% END -%] ); $prompter->prompt( <<'END_DESCRIPTION', $prompt, @valid_anwsers ); END_DESCRIPTION } [%- END -%] [%- END -%] =back =head1 WARNING: AUTOGENERATED This module is autogenerated in the pre-distribution build process, so to change it, you need the master repository files in ui_machines/..., not a CPAN/PPM/tarball/.zip/etc. distribution. =head1 COPYRIGHT Copyright 2003, Perforce Software, Inc. All Rights Reserved. This module and the VCP package are licensed according to the terms given in the file LICENSE accompanying this distribution, a copy of which is included in L. =head1 AUTHOR Barrie Slaymaker =cut 1;