line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Ex::Recipes::Delete; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1025
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
4
|
1
|
|
|
1
|
|
34
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
5
|
1
|
|
|
1
|
|
19
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
6
|
1
|
|
|
1
|
|
5
|
use base qw(CGI::Ex::Recipes); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
233
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
0
|
1
|
|
sub info_complete { 1 } |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub finalize { |
14
|
0
|
|
|
0
|
1
|
|
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; # End of CGI::Ex::Recipes::Delete |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |