File | /project/perl/lib/Class/DBI/Cascade/Delete.pm |
Statements Executed | 10 |
Statement Execution Time | 344µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
0 | 0 | 0 | 0s | 0s | BEGIN | Class::DBI::Cascade::Delete::
0 | 0 | 0 | 0s | 0s | cascade | Class::DBI::Cascade::Delete::
Line | State ments |
Time on line |
Calls | Time in subs |
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 | 3 | 93µs | 1 | 25µs | use strict; # spent 25µs making 1 call to strict::import |
15 | 3 | 86µs | 1 | 114µs | use warnings; # spent 114µs making 1 call to warnings::import |
16 | |||||
17 | 3 | 155µs | 1 | 1.36ms | use base 'Class::DBI::Cascade::None'; # spent 1.36ms making 1 call to base::import |
18 | |||||
19 | sub cascade { | ||||
20 | my ($self, $obj) = @_; | ||||
21 | $self->foreign_for($obj)->delete_all; | ||||
22 | } | ||||
23 | |||||
24 | 1 | 10µs | 1; |