in reply to Re^3: You cannot pass args when calling inner() in Moose?
in thread You cannot pass args when calling inner() in Moose?

For the time-being, I have if-then'ed a solution:
sub updateprogress { my ($self) = @_; return unless $self->progressbar; my $frac = frac($self->recordi, $self->recordcount); $self->progressbar->set_fraction($frac->num); }
and then the data processing loop blindly calls this graphic method:
sub manager { my ($Operation) = @_; my @row = $Operation->getnew; my ( @warnings, @fatals ); $Operation->recordi(0); for my $row (@row) { $Operation->recordi( $Operation->recordi + 1 ); $Operation->data($row); $Operation->process; $Operation->updateprogress; } ( \@warnings, @fatals ); }




The mantra of every experienced web application developer is the same: thou shalt separate business logic from display. Ironically, almost all template engines allow violation of this separation principle, which is the very impetus for HTML template engine development.

-- Terence Parr, "Enforcing Strict Model View Separation in Template Engines"