line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::DBI::Cascade::Delete; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Class::DBI::Cascade::Delete - Delete related objects |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
This is a Cascading Delete strategy that will delete any related |
10
|
|
|
|
|
|
|
objects. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=cut |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
76
|
|
15
|
2
|
|
|
2
|
|
18
|
use warnings; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
74
|
|
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
2
|
|
9
|
use base 'Class::DBI::Cascade::None'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1335
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub cascade { |
20
|
0
|
|
|
0
|
1
|
|
my ($self, $obj) = @_; |
21
|
0
|
|
|
|
|
|
$self->foreign_for($obj)->delete_all; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |