The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Name

spvm - Executing SPVM programs

Description

The spvm command executes SPVM programs.

Usage

  usage: spvm [<options>] <class name>
    
    spvm -I lib/SPVM Myapp
  
  options:
    -h, --help                     Shows this message
    -v, --version                  Shows the version
    -I, --include-dir <directory>  Adds a include directory
    -B, --build-dir <directory>    Build diretory
    -e <source>                    Executes a program source code

Details

  spvm [<options>] <class name>

The spvm command executes a SPVM program.

<options> are options.

<class name> is a class name that contains a bootstrap method.

See Class Search Directories about default class search directories.

See SPVM::Document::EnvironmentVariables about available environment variables.

Options

--help

Outputs how to use the spvm command to standard output.

-h

  -h

Same as "--help".

--version

Outputs the version of the spvm command to standard output. This version is the same as the version of SPVM.

-v

  -v

Same as "--version".

--include-dir

  --include-dir <directory>

Prepends <directory> to 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]

-I

  -I <directory>

Same as "--include-dir".

--build-dir

  --build-dir <directory>

Sets SPVM_BUILD_DIR environment variable to <directory>.

-B

  -B <directory>

Same as "--build-dir".

-e

  -e <source>

Executes a program from the source string <source>.

<source> is exceuted by Native::Compiler#eval_string.

Examples:

  spvm -e 'say "Hello World!";';

Copyright & License

Copyright 2023 Yuki Kimoto. All Rights Reserved.

MIT License.