Revision 7da9d5b6
Von Sven Schöling vor mehr als 11 Jahren hinzugefügt
SL/DB/Object.pm | ||
---|---|---|
14 | 14 |
|
15 | 15 |
use base qw(Rose::DB::Object); |
16 | 16 |
|
17 |
my @rose_reserved_methods = qw( |
|
18 |
db dbh delete DESTROY error init_db _init_db insert load meta meta_class |
|
19 |
not_found save_ update import |
|
20 |
); |
|
21 |
|
|
17 | 22 |
sub new { |
18 | 23 |
my $class = shift; |
19 | 24 |
my $self = $class->SUPER::new(); |
... | ... | |
50 | 55 |
|
51 | 56 |
my $pk = ref($self)->meta->primary_key; |
52 | 57 |
delete @attributes{$pk->column_names} if $pk; |
58 |
delete @attributes{@rose_reserved_methods}; |
|
53 | 59 |
|
54 | 60 |
return $self->_assign_attributes(%attributes); |
55 | 61 |
} |
Auch abrufbar als: Unified diff
assign_attribute: reservierte Methoden ignorieren.