1Mojolicious::Command::eUvsaelr(3C)ontributed Perl DocumeMnotjaotliiocnious::Command::eval(3)
2
3
4

NAME

6       Mojolicious::Command::eval - Eval command
7

SYNOPSIS

9         Usage: APPLICATION eval [OPTIONS] CODE
10
11           ./myapp.pl eval 'say app->ua->get("/")->result->body'
12           ./myapp.pl eval 'say for sort keys %{app->renderer->helpers}'
13           ./myapp.pl eval -v 'app->home'
14           ./myapp.pl eval -V 'app->renderer->paths'
15
16         Options:
17           -h, --help          Show this summary of available options
18               --home <path>   Path to home directory of your application, defaults to
19                               the value of MOJO_HOME or auto-detection
20           -m, --mode <name>   Operating mode for your application, defaults to the
21                               value of MOJO_MODE/PLACK_ENV or "development"
22           -v, --verbose       Print return value to STDOUT
23           -V                  Print returned data structure to STDOUT
24

DESCRIPTION

26       Mojolicious::Command::eval runs code against applications. If the
27       result is a promise (then-able), it will wait until the promise is
28       fulfilled or rejected and the result is returned.
29
30       This is a core command, that means it is always enabled and its code a
31       good example for learning to build new commands, you're welcome to fork
32       it.
33
34       See "COMMANDS" in Mojolicious::Commands for a list of commands that are
35       available by default.
36

ATTRIBUTES

38       Mojolicious::Command::eval inherits all attributes from
39       Mojolicious::Command and implements the following new ones.
40
41   description
42         my $description = $eval->description;
43         $eval           = $eval->description('Foo');
44
45       Short description of this command, used for the command list.
46
47   usage
48         my $usage = $eval->usage;
49         $eval     = $eval->usage('Foo');
50
51       Usage information for this command, used for the help screen.
52

METHODS

54       Mojolicious::Command::eval inherits all methods from
55       Mojolicious::Command and implements the following new ones.
56
57   run
58         $eval->run(@ARGV);
59
60       Run this command.
61

SEE ALSO

63       Mojolicious, Mojolicious::Guides, <https://mojolicious.org>.
64
65
66
67perl v5.30.1                      2020-01-30     Mojolicious::Command::eval(3)
Impressum