Commit | Line | Data |
c0e7b4e5 |
1 | package # hide from PAUSE |
2 | DBIx::Class::CDBICompat::DestroyWarning; |
a3018bd3 |
3 | |
4 | use strict; |
5 | use warnings; |
5e0eea35 |
6 | |
7 | use base 'DBIx::Class'; |
8 | |
e1d9e578 |
9 | use DBIx::Class::_Util 'detected_reinvoked_destructor'; |
3d56e026 |
10 | use namespace::clean; |
a3018bd3 |
11 | |
12 | sub DESTROY { |
e1d9e578 |
13 | return if &detected_reinvoked_destructor; |
3d56e026 |
14 | |
a3018bd3 |
15 | my ($self) = @_; |
16 | my $class = ref $self; |
17 | warn "$class $self destroyed without saving changes to " |
18 | .join(', ', keys %{$self->{_dirty_columns} || {}}) |
19 | if keys %{$self->{_dirty_columns} || {}}; |
20 | } |
21 | |
22 | 1; |