Class-AutoDB
view release on metacpan or search on metacpan
t/autodbTestObject.pm view on Meta::CPAN
652653654655656657658659660661662663664665666667668669670671672# $self->objects([]);
## $self->object(undef);
# }
sub
old_counts {
my
$self
=
shift
;
my
@tables
=
@_
?
@_
: @{
$self
->tables};
my
$old_counts
=
$self
->{old_counts} || (
$self
->_old_counts(
@tables
));
# $old_counts=norm_counts(map {$_=>$old_counts->{$_}} @tables);
$old_counts
;
}
sub
update_counts {
my
(
$self
,
$new_counts
)=
@_
;
my
$old_counts
=
$self
->old_counts;
my
@tables
=
keys
%$new_counts
;
@$old_counts
{
@tables
}=
@$new_counts
{
@tables
};
}
sub
diff_counts {
my
$self
=
shift
;
my
@tables
=
@_
?
@_
: @{
$self
->tables};
my
$old_counts
=
$self
->old_counts(
@tables
);
my
$new_counts
=actual_counts(
@tables
);
( run in 0.318 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )