Oi pessoal<br><br>Sorry pelo "nao esta funcionando" ....<br><br>entao, segui o manual e li varios exemplos pela net <br><br>meu step-by-step foi:<br><br># <a href="http://catalyst.pl">catalyst.pl</a> teste<br># cd teste/<br>
# script/<a href="http://teste_create.pl">teste_create.pl</a> controller Temp<br># script/<a href="http://teste_create.pl">teste_create.pl</a> view Temp::TT<br># vi lib/teste/Controller/Temp.pm<br>== Temp.pm ==<br># adicionei isso<br>
sub list : Global {<br> my ( $self, $c, @args ) = @_;<br> $c->stash->{template} = '<a href="http://temp.tt">temp.tt</a>';<br><br>}<br>== Temp.pm ==<br><br># vi lib/teste/View/Temp/TT.pm<br>## Esse aki segundo indicacao do daniel<br>
__PACKAGE__->config(<br><br> TEMPLATE_EXTENSION => '.tt2',<br><br> # Set the location for TT files - changes base directory for your template files from root to root/src.<br> INCLUDE_PATH => [<br>
teste->path_to( 'root', 'src' ), # changes base template dir to root/src<br> ],<br>);<br><br>criei o arquivo root/src/<a href="http://temp.tt">temp.tt</a><br><p> teste sssssssssssss </p><br>
<br>e iniciei o server <br><br>quando acesso o /list ele retorna :<br><pre><code class="error">teste::View::Temp::TT directly inherits from Catalyst::View. You need to<br> inherit from a subclass like Catalyst::View::TT instead.<br>
<br>e o debug do request, response, ...<br><br>:( <br><br><br>abs<br></code></pre><br><br><div class="gmail_quote">2010/1/7 Daniel Hughes <span dir="ltr"><<a href="mailto:dsthughes@gmail.com">dsthughes@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">faz muito tempo desde de usar Catalyst. mas vc checou o modulo arquivo: nome_do_seu_projeto/lib/nome_do_seu_projeto/View/TT.pm e.g. se usasse o exemplo <code>lib/Hello/View/TT.pm </code>- deve ser alguma coisa como em baixo. acho que lembro que as vezes o ´path´ e ´template extension´ defaults sao incompativeis com algumas versoes<br>
<br>package nome_do_seu_projeto::View::TT;<br><br>use strict;<br>use base 'Catalyst::View::TT';<br><br># __PACKAGE__->config(TEMPLATE_EXTENSION => '.tt');<br><br> __PACKAGE__->config(<br><br> # Change default TT extension - .tt' to '.tt2'<br>
TEMPLATE_EXTENSION => '.tt2',<br> <br> # Set the location for TT files - changes base directory for your template files from root to root/src.<br> INCLUDE_PATH => [<br> bed1->path_to( 'root', 'src' ), # changes base template dir to root/src<br>
],<br><br>dan.<br><font color="#888888">-- <br>Daniel S. T. Hughes M.Biochem (Hons; Oxford), Ph.D (Cambridge)<br>-------------------------------------------------------------------------------------<br>+55 21 8344 9098<br>
<a href="mailto:dsth@cantab.net" target="_blank">dsth@cantab.net</a><br>
<a href="mailto:dsth@cpan.org" target="_blank">dsth@cpan.org</a><br>
</font><br>_______________________________________________<br>
Rio-pm mailing list<br>
<a href="mailto:Rio-pm@pm.org">Rio-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/rio-pm" target="_blank">http://mail.pm.org/mailman/listinfo/rio-pm</a><br></blockquote></div><br>