<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Eu tive problemas parecidos há alguns meses ao tentar usar o CPAN com sudo no ubuntu. <br>A dist do ubuntu usa uma árvore de diretórios de bibliotecas diferente e não reconhece alguns módulos do CPAN.<br>Se vc precisa da instalação sem o lib::local vai ter que eliminar na mão as incompatibilidades.<br>ubuntu --<br>:(<br><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">De:</span></b> Otavio Pereira &lt;otavio.pereira@gmail.com&gt;<br><b><span style="font-weight: bold;">Para:</span></b> saopaulo-pm@mail.pm.org<br><b><span style="font-weight: bold;">Enviadas:</span></b> Terça-feira, 14
 de Setembro de 2010 17:51:19<br><b><span style="font-weight: bold;">Assunto:</span></b> [SP-pm] Erro de versão de módulo ao fazer o tutorial do Catalyst<br></font><br><meta http-equiv="x-dns-prefetch-control" content="off"><div>Boa tarde pessoal,</div><div><br></div><div>Estou fazendo o tutorial do Catalyst e numa máquina com Ubuntu 9.04 e até hoje com uma instalação do perl e modulos do repositório da Canonical. Eu estava com a versão 0.20 do&nbsp;Catalyst::Model::DBIC::Schema e no tutorial pede o 0.4. Em princípio pensei em 20 &gt; 4, e gerei o modelo e ele tinha o load_classes ao invés do load_namespaces.</div>

<div><br></div><div>Então eu (conforme orientação do tutorial) :</div><div>$<font class="Apple-style-span" color="#000099">sudo cpan Catalyst::Model::DBIC::Schema</font></div><div>yadda yadda&nbsp;</div><div>Instalar o Moose (s/n)<font class="Apple-style-span" color="#000099"> S</font></div>

<div>yadda yadda</div><div><br></div><div>&nbsp;$ <font class="Apple-style-span" color="#000099">script/<a rel="nofollow" target="_blank" href="http://myapp_create.pl">myapp_create.pl</a> model DB DBIC::Schema MyApp::Schema create=static dbi:SQLite:myapp.db on_connect_do="PRAGMA foreign_keys = ON"</font></div>

<div><font class="Apple-style-span" color="#000099">&nbsp;</font>exists "/home/genoa/MyApp/script/../lib/MyApp/Model"</div><div>&nbsp;exists "/home/genoa/MyApp/script/../t"</div><div><font class="Apple-style-span" color="#cc0000">The get_method_map method has been made private. The public version is deprecated and will be removed in a future release.</font></div>

<div><font class="Apple-style-span" color="#cc0000">&nbsp;at /usr/local/lib/perl/5.10.0/Class/MOP/Deprecated.pm line 83</font></div><div><font class="Apple-style-span" color="#cc0000">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Class::MOP::Package::get_method_map('Moose::Meta::Class=HASH(0x347df38)') called at /usr/local/share/perl/5.10.0/namespace/<a rel="nofollow" target="_blank" href="http://autoclean.pm">autoclean.pm</a> line 41</font></div>

<div><font class="Apple-style-span" color="#cc0000">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;namespace::autoclean::__ANON__() called at /usr/local/share/perl/5.10.0/B/Hooks/EndOfScope.pm line 47</font></div><div><font class="Apple-style-span" color="#cc0000">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;B::Hooks::EndOfScope::__ANON__('HASH(0x2390d30)', 'ARRAY(0x347dc20)') called at /usr/local/share/perl/5.10.0/Catalyst/Helper/Model/DBIC/Schema.pm line 599</font></div>

<div><font class="Apple-style-span" color="#cc0000">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;eval {...} called at /usr/local/share/perl/5.10.0/Catalyst/Helper/Model/DBIC/Schema.pm line 599</font></div><div><font class="Apple-style-span" color="#cc0000">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;require Catalyst/Helper/Model/DBIC/Schema.pm called at (eval 221) line 3</font></div>

<div><font class="Apple-style-span" color="#cc0000">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;eval 'require Catalyst::Helper::Model::DBIC::Schema</font></div><div><font class="Apple-style-span" color="#cc0000">;' called at /usr/share/perl5/Catalyst/Helper.pm line 159</font></div>

<div>&nbsp;&nbsp; &nbsp; &nbsp; <font class="Apple-style-span" color="#ff0000">&nbsp;Catalyst::Helper::mk_component('Catalyst::Helper=HASH(0x3111180)', 'MyApp', 'model', 'DB', 'DBIC::Schema', 'MyApp::Schema', 'create=static', 'dbi:SQLite:myapp.db', 'on_connect_do=PRAGMA foreign_keys = ON', ...) called at script/<a rel="nofollow" target="_blank" href="http://myapp_create.pl">myapp_create.pl</a> line 23</font></div>

<div>Dumping manual schema for MyApp::Schema to directory /home/genoa/MyApp/script/../lib ...</div><div>Schema dump completed.</div><div>&nbsp;exists "/home/genoa/MyApp/script/../lib/MyApp/Model/DB.pm"</div><div>created "/home/genoa/MyApp/script/../lib/MyApp/Model/DB.pm.new"</div>

<div>&nbsp;exists "/home/genoa/MyApp/script/../t/model_DB.t"</div><div><br></div><div>Tentei entender a mensagem de erro, não consegui e tentei então atualizar/instalar os módulos citados no erro via comando cpan. Sem efeito. Então desistalei os módulos instalados via cpan (Catalyst::Model::DBIC::Schema e Moose) e consigo novamente rodar o script mas gerando o Schema com o load_classes.</div>

<div><br></div><div>Otávio</div>
<meta http-equiv="x-dns-prefetch-control" content="on"></div></div>
</div><br>



      &nbsp;</body></html>