-I, --include-dir DIRECTORY Adds a include directory
-B, --build-dir DIRECTORY Build diretory
-e SOURCE Executes a program source code in main method.
-c Check syntx only
=head1 Details
spvm [OPTIONS] SCRIPT_NAME
The C<spvm> command executes a SPVM program.
I<OPTIONS> are L<options|/"Options">.
I<SCRIPT_NAME> is a script name that contains a L<bootstrap method|SPVM::Document::Language::Class/"Bootstrap Method"> in an L<anon class|SPVM::Document::Language::Class/"Anon Class">.
class {
static method main : void () {
}
}
See L<Class Search Directories|SPVM::Document::Language::Class/"Class Search Directories"> about defaultclass search directories.
See L<SPVM::Document::EnvironmentVariables> about available environment variables.
=head1 Options
=head2 --help
Outputs how to usethe C<spvm> command to standard output.
=head2 -h
-h
Same as L</"--help">.
=head2 --version
Outputs the version of the C<spvm> command to standard output. This version is the same as the version of L<SPVM>.
=head2 -v
-v
Same as L</"--version">.
=head2 --include-dir
--include-dir DIRECTORY
Prepends I<DIRECTORY> to L<class search directories|SPVM::Document::Language::Class/"Class Search Directories">
This option can be specified multiple times.
--include-dir dir1 --include-dir dir2
In this case, class search directories becomes the following.
[dir1, dir2, default_dirs]
=head2 -I
-I DIRECTORY
Same as L</"--include-dir">.
=head2 --build-dir
--build-dir DIRECTORY
Sets L<SPVM_BUILD_DIR|SPVM::Document::EnvironmentVariables/"SPVM_BUILD_DIR"> environment variable to I<DIRECTORY>.
=head2 -B
-B DIRECTORY
Same as L</"--build-dir">.
=head2 -E
-E SOURCE
Executes a source code I<SOURCE>.
Examples:
spvm -E 'class { static method main : void () { say "Hello World!"; } }';
=head2 -e
-e SOURCE
Executes a source code I<SOURCE> in C<main> method.
Examples:
spvm -e 'say "Hello World!";';
=head2 -c
-c
Checks syntax only.
=head2 -w
-w
Enables warning flag.
Implementation:
Sets L<CommandInfo#WARNING|SPVM::CommandInfo> class variable to 1.
=head1 lib Directive
If the source code specified by I<SCRIPT_NAME>, C<-E>, or C<-e> option contains lib directives, The directories specified by lib directive is prepeneded to L<class search directories|SPVM::Document::Language::Class/"Class Search Directories">.
#lib "$FindBin::Bin/lib"
class {
}
This directories specified by lib directive is placed afterthe directories specified by L</"--include-dir"> option.
=head1 Copyright & License
Copyright 2023 Yuki Kimoto. All Rights Reserved.
MIT License.
Keyboard Shortcuts
Global
s
Focus search bar
?
Bring up this help dialog
GitHub
gp
Go to pull requests
gi
go to github issues (only if github is preferred repository)