| 1 | package CGI::Ex::Recipes::Delete; | ||
| 2 | |||
| 3 | 1 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use base qw(CGI::Ex::Recipes); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 1 | our $VERSION = '0.03'; | |
| 9 | |||
| 10 | |||
| 11 | 0 | ▶ | sub info_complete { 1 } |
|
Subroutine
info_complete: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 12 | |||
| 13 | 0 | ▶ | sub finalize { |
|
Subroutine
finalize: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 14 | 0 | my $self = shift; | |
| 15 | 0 | $self->dbh->prepare("DELETE FROM recipes WHERE id = ?")->execute($self->form->{'id'}); | |
| 16 | |||
| 17 | 0 | $self->add_to_form(success => "Recipe deleted from the database"); | |
| 18 | #make so default page displays the category in which this item is | ||
| 19 | 0 | $self->form->{'id'} = $self->form->{step_args}{'pid'}; | |
| 20 | 0 | return 1; | |
| 21 | } | ||
| 22 | |||
| 23 | 1 | 1; # End of CGI::Ex::Recipes::Delete | |
| 24 | |||
| 25 | __END__ | ||