Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^4: You cannot pass args when calling inner() in Moose?

by metaperl (Curate)
on Jul 21, 2011 at 19:03 UTC ( [id://915966]=note: print w/replies, xml ) Need Help??


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"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://915966]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found