X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRow.pm;fp=lib%2FDBIx%2FClass%2FRow.pm;h=a17c3f76b3e02ecc31cd7a5b03b48c34ddb13e78;hb=4c8ef945c4ff78639c2d689200caa97a0b81a243;hp=6ee598b992cd5fdffe1ead6d1fac7d2b96265383;hpb=a34c76c2391de12c939f22e4dba875374aea1f66;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index 6ee598b..a17c3f7 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -22,6 +22,8 @@ BEGIN { use namespace::clean; +__PACKAGE__->mk_group_accessors ( simple => [ in_storage => '_in_storage' ] ); + =head1 NAME DBIx::Class::Row - Basic row methods @@ -176,7 +178,7 @@ sub new { my ($class, $attrs) = @_; $class = ref $class if ref $class; - my $new = bless { _column_data => {} }, $class; + my $new = bless { _column_data => {}, _in_storage => 0 }, $class; if ($attrs) { $new->throw_exception("attrs must be a hashref") @@ -480,13 +482,6 @@ are used. Creating a result object using L, or calling L on one, sets it to false. -=cut - -sub in_storage { - my ($self, $val) = @_; - $self->{_in_storage} = $val if @_ > 1; - return $self->{_in_storage} ? 1 : 0; -} =head2 update @@ -619,7 +614,7 @@ sub delete { ); delete $self->{_column_data_in_storage}; - $self->in_storage(undef); + $self->in_storage(0); } else { my $rsrc = try { $self->result_source_instance } @@ -773,6 +768,7 @@ Marks a column as having been changed regardless of whether it has really changed. =cut + sub make_column_dirty { my ($self, $column) = @_;