Remove unwanted output

34 views
Skip to first unread message

Pavel Serikov

unread,
Nov 11, 2016, 4:25:27 PM11/11/16
to Mojolicious
Hello everyone,

I have a simple perl script runserver.pl which runs mojo application from class :

#!/usr/bin/env perl
use Mojolicious::Commands;
use Net::EmptyPort qw(empty_port);
my $port = empty_port(3000);
Mojolicious::Commands->start_app('API::Google::Server', 'daemon', '-l', 'http://*:'.$port);

When I run it it produces too much additional log (= showing mojo help) like I run Mojolicious app from shell without any parameters:

pavel@pavel-Inspiron-3542:~/projects/google-apis-perl$ perl runserver.pl
Usage: APPLICATION COMMAND [OPTIONS]

  mojo version
  mojo generate lite_app
 
./myapp.pl daemon -m production -l http://*:8080
 
./myapp.pl get /foo
 
./myapp.pl routes -v

Tip: CGI and PSGI environments can be automatically detected very often and
     work without commands
.

Options (for all commands):
 
-h, --help          Get more information on a specific command
     
--home <path>   Path to home directory of your application, defaults to
                      the value of MOJO_HOME
or auto-detection
 
-m, --mode <name>   Operating mode for your application, defaults to the
                      value of MOJO_MODE
/PLACK_ENV or "development"

Commands:
 cgi      
Start application with CGI
 cpanify  
Upload distribution to CPAN
 daemon    
Start application with HTTP and WebSocket server
 
eval      Run code against application
 generate  
Generate files and directories from templates
 
get       Perform HTTP request
 inflate  
Inflate embedded files to real files
 prefork  
Start application with pre-forking HTTP and WebSocket server
 psgi      
Start application with PSGI
 routes    
Show available routes
 test      
Run tests
 version  
Show versions of available modules

See 'APPLICATION help COMMAND' for more information on a specific command.
[Sat Nov 12 00:18:04 2016] [info] Listening at "http://*:3005"
Server available at http://127.0.0.1:3005

I need that log will be just

[Sat Nov 12 00:18:04 2016] [info] Listening at "http://*:3005"
Server available at http://127.0.0.1:3005

How to remove additional output ?

Reply all
Reply to author
Forward
0 new messages