| 1 | package Zapp::Task::Action::Confirm; | ||||||||||
| 2 | |||||||||||
| 3 | #pod =head1 DESCRIPTION | ||||||||||
| 4 | #pod | ||||||||||
| 5 | #pod The Confirm action prompts a user to click a button to proceed with the run. | ||||||||||
| 6 | #pod | ||||||||||
| 7 | #pod =head1 SEE ALSO | ||||||||||
| 8 | #pod | ||||||||||
| 9 | #pod L<Zapp::Task::Action> | ||||||||||
| 10 | #pod | ||||||||||
| 11 | #pod =cut | ||||||||||
| 12 | |||||||||||
| 13 | 2 | ▶ | use Mojo::Base 'Zapp::Task::Action', -signatures; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | ▶ | sub run( $self, $task_input ) { | |||||||||
|
Subroutine
run: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 16 | 0 | my $form_input = $self->info->{notes}{input}; | |||||||||
| 17 | # Clicking a button adds the name to the form input | ||||||||||
| 18 | 0 | ▶ | if ( exists $form_input->{confirm} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 0 | return $self->finish( { is_success => 1 } ); | |||||||||
| 20 | } | ||||||||||
| 21 | 0 | return $self->fail( { is_success => 0 } ); | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 2 | 1; | |||||||||
| 25 | |||||||||||
| 26 | =pod | ||||||||||
| 27 | |||||||||||
| 28 | =head1 NAME | ||||||||||
| 29 | |||||||||||
| 30 | Zapp::Task::Action::Confirm | ||||||||||
| 31 | |||||||||||
| 32 | =head1 VERSION | ||||||||||
| 33 | |||||||||||
| 34 | version 0.001 | ||||||||||
| 35 | |||||||||||
| 36 | =head1 DESCRIPTION | ||||||||||
| 37 | |||||||||||
| 38 | The Confirm action prompts a user to click a button to proceed with the run. | ||||||||||
| 39 | |||||||||||
| 40 | =head1 SEE ALSO | ||||||||||
| 41 | |||||||||||
| 42 | L<Zapp::Task::Action> | ||||||||||
| 43 | |||||||||||
| 44 | =head1 AUTHOR | ||||||||||
| 45 | |||||||||||
| 46 | Doug Bell <preaction@cpan.org> | ||||||||||
| 47 | |||||||||||
| 48 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 49 | |||||||||||
| 50 | This software is copyright (c) 2020 by Doug Bell. | ||||||||||
| 51 | |||||||||||
| 52 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 53 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 54 | |||||||||||
| 55 | =cut | ||||||||||
| 56 | |||||||||||
| 57 | __DATA__ | ||||||||||