Re: [Mojolicious] Problem with implementing custom command in Mojolicious::Lite app

2017-03-10 Thread Pavel Serikov
You are absolutely right, it's mine inattention :)
Question closed.

пятница, 10 марта 2017 г., 15:03:06 UTC+3 пользователь Luc Didry написал:
>
> 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  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, 
>  
> > 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 mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Problem with implementing custom command in Mojolicious::Lite app

2017-03-10 Thread Luc Didry
vendredi 10 mars 2017, 03:48:27 CET Pavel Serikov wrote:
> Hello everyone,
> 
> I'm trying to implement custom command 
> 
>  
> in my app  like described in cookbook 
> 
> .
> 
> 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,  
> 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 mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Problem with implementing custom command in Mojolicious::Lite app

2017-03-10 Thread Pavel Serikov
Hello everyone,

I'm trying to implement custom command 

 
in my app  like described in cookbook 

.

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,  
line 1.

What am I doing wrong?

-- 
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 mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.