A view is a subclass of ENGINE::MVC::View that reimplements the paint() method. It has a model and a controller. A very simple view might look like this:
package Customer::Project::HelloWorld::View; use strict; use base "ENGINE::MVC::View"; sub paint { my($self) = @_; my $model = $self->model; print $model->header,"\n"; print "Hello World
"; }
Other views might open file handles and print to those or send eMails. It might also want to ask the controller to instantiate another view. That is totally up to the application.
If you are doing anything serious, you probably want to use templates to discribe your views. In that case you might only need a single view for your whole site that inherits from ENGINE::MVC::View::Template (For Template Toolkit, other template systems can easily be integrated). It might look like this:
package Customer::Project::View; use strict; use base "ENGINE::MVC::View::Template"; sub paint { my($self) = @_; print $self->model->header(),"\n"; $self->SUPER::paint() } sub include_path { "/some/path" }
So much for views, models are next.