MVC::Neaf::CLI - Command line debugger and runner for Not Even A Framework
Run your applications from command line, with various overrides.
May be useful for command-line mode debugging (think CGI.pm) as well as starting the app from command line.
perl application.pl --list
Print routes defined in the application.
perl application.pl --post /foo/bar arg=42
Simulate a request without running a server.
perl application.pl --listen :5000
Run a psgi server.
--help - display a brief usage message.
--list - print routes configured in the application.
--listen <port-or-socket> - start application as a standalone plack servers. Any subsequent options compatible with plackup(1) are allowed in this mode.
--post - set method to POST.
--method METHOD - set method to anything else.
--upload id=/path/to/file - add upload. Requires --post.
--cookie name="value" - add cookie.
--header name="value" - set http header.
--view - force (JS,TT,Dumper) view.
The usage doesn't expect these are called directly.
But just for the sake of completeness...
Run the application. This reads command line options, as shown in the summary above.
$app is an MVC::Neaf object.
NOTE Spoils @AGRV.
Use Plack::Runner to start server.
Call MVC::Neaf's run_test.
run_test
Display help message.
List registered Neaf routes.
This module is part of MVC::Neaf suite.
Copyright 2016-2019 Konstantin S. Uvarin khedin@cpan.org.
khedin@cpan.org
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install MVC::Neaf, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MVC::Neaf
CPAN shell
perl -MCPAN -e shell install MVC::Neaf
For more information on module installation, please visit the detailed CPAN module installation guide.