vendredi 10 mars 2017, 03:48:27 CET Pavel Serikov wrote:
> Hello everyone,
> 
> I'm trying to implement custom command 
> <https://github.com/pavelsr/SocialBOM/blob/master/lib/App/SocialBOM/Command/cmd1.pm>
>  
> in my app <https://github.com/pavelsr/socialbom> like described in cookbook 
> <http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Adding-commands-to-Mojolicious>
> .
> 
> Custom namespace is loaded, however command doesn't work:
> 
> pavel@pavel-Inspiron-3542:/projects/bom$ socialbom cmd1
> Unknown command "cmd1", maybe you need to install it?
> Compilation failed in require at /usr/local/bin/socialbom line 14, <DATA> 
> line 1.
> 
> What am I doing wrong?
> 
> 

Just a guess : in
https://github.com/pavelsr/SocialBOM/blob/master/lib/App/SocialBOM.pm#L197, you
should put
push @{app->commands->namespaces}, 'App::SocialBOM::Command';
instead of
push @{app->commands->namespaces}, 'App::SocialBOM::Command::cmd1';
-- 
Luc
https://fiat-tux.fr/
https://luc.frama.io/
Internet n'est pas compliqué, Internet est ce que vous en faites.

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to