package Egg::View; # # Masatoshi Mizuno ElusheE<64>cpan.orgE # # $Id: View.pm 226 2008-01-27 10:23:16Z lushe $ # use strict; use warnings; use base qw/ Egg::Base /; use Carp qw/ croak /; our $VERSION= '3.00'; sub template { my $e= shift->e; my $template= $e->template || do { my $path= join('/', @{$e->action}) || do { $e->debug_out(__PACKAGE__. q{ - $e->template is empty. }); return do { $e->finished('404 Not Found'); (undef) }; }; "$path.". $e->config->{template_extention}; }; $e->debug_out("# + template file : $template"); $template; } 1; __END__ =head1 NAME Egg::View - Base class for view. =head1 DESCRIPTION It is a base class for the view component. This module has succeeded to L. =head1 METHODS =head2 template If this is undefined, passing and the file name of the template are generated from $e-Eaction though $e-Etemplate is returned. And, when the template is not obtained from $e-Eaction, it is $e-Efinished(404) and undefined is returned. my $template= $e->view->template || return 0; =head1 SEE ALSO L, L, =head1 AUTHOR Masatoshi Mizuno ElusheE<64>cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright (C) 2008 Bee Flag, Corp. ELE, All Rights Reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available. =cut