Versions in this module Expand all Collapse all v0 v0.2.0 Aug 31, 2026 Changes in this version + func Adopt[T PerlValue](c *Perl, v T) (T, error) + func As[T PerlValue](v Value) (T, error) + func ExitCode(err error) (int, bool) + type ArrayValue struct + func (v ArrayValue) Index(ctx context.Context, i int) (Value, error) + func (v ArrayValue) Kind() Kind + func (v ArrayValue) Len(ctx context.Context) (int, error) + func (v ArrayValue) Push(ctx context.Context, vals ...Value) error + func (v ArrayValue) Ref() RefValue + func (v ArrayValue) SetIndex(ctx context.Context, i int, val Value) error + func (v ArrayValue) Values(ctx context.Context) ([]Value, error) + type CodeValue struct + func (v CodeValue) Call(ctx context.Context, args ...Value) ([]Value, error) + func (v CodeValue) CallScalar(ctx context.Context, args ...Value) (Value, error) + func (v CodeValue) Kind() Kind + func (v CodeValue) Ref() RefValue + type GlobValue struct + func (v GlobValue) Kind() Kind + func (v GlobValue) Ref() RefValue + type GoFunc func(args []Value) ([]Value, error) + type HashValue struct + func (v HashValue) Delete(ctx context.Context, key string) error + func (v HashValue) Get(ctx context.Context, key string) (Value, bool, error) + func (v HashValue) Keys(ctx context.Context) ([]string, error) + func (v HashValue) Kind() Kind + func (v HashValue) Ref() RefValue + func (v HashValue) Set(ctx context.Context, key string, val Value) error + type IOValue struct + func (v IOValue) Kind() Kind + func (v IOValue) Ref() RefValue + type Kind uint8 + const KindArray + const KindBool + const KindCode + const KindFloat + const KindGlob + const KindHash + const KindIO + const KindInt + const KindRef + const KindString + const KindUndef + func (k Kind) String() string + type Pair struct + K string + V Value + type Perl struct + func New(cfg Config) (*Perl, error) + func (p *Perl) AddInc(ctx context.Context, dirs ...string) error + func (p *Perl) AddXSDir(dir string) error + func (p *Perl) Bind(name string, fn GoFunc) error + func (p *Perl) BindClass(name string, methods map[string]GoFunc) error + func (p *Perl) Call(ctx context.Context, name string, args ...Value) ([]Value, error) + func (p *Perl) Clone() (*Perl, error) + func (p *Perl) Close() error + func (p *Perl) Eval(ctx context.Context, src string) (Result, error) + func (p *Perl) NewArray(ctx context.Context, vals ...Value) (ArrayValue, error) + func (p *Perl) NewHash(ctx context.Context, pairs ...Pair) (HashValue, error) + func (p *Perl) RunFile(ctx context.Context, path string, incDirs []string, args []string) error + type PerlError struct + Message string + func (e *PerlError) Error() string + type PerlValue interface + type RefValue struct + func (v RefValue) Can(ctx context.Context, method string) (bool, error) + func (v RefValue) Class() (string, bool) + func (v RefValue) Deref(ctx context.Context) (Value, error) + func (v RefValue) Equal(o RefValue) bool + func (v RefValue) Isa(ctx context.Context, class string) (bool, error) + func (v RefValue) Kind() Kind + func (v RefValue) MethodCall(ctx context.Context, method string, args ...Value) ([]Value, error) + type Result struct + Error error + Stderr string + Stdout string + Value Value + type ScalarType interface + type ScalarValue struct + func Undef() ScalarValue + func ValueOf[T ScalarType](v T) ScalarValue + func (v ScalarValue) Bool() bool + func (v ScalarValue) Bytes() []byte + func (v ScalarValue) Float() float64 + func (v ScalarValue) Int() int64 + func (v ScalarValue) Kind() Kind + func (v ScalarValue) String() string + type Value interface + Kind func() Kind v0.1.0 Jul 11, 2026 Changes in this version + func ExtractStdlib() (string, error) + func Init() error + func PerlClose(h uint64) error + func PerlEval(h uint64, src string) (string, error) + func PerlInterruptAddr(h uint64) (uint32, error) + func PerlNew(libDir string) (uint64, error) + type CallbackHandler interface + HandleCallback func(methodID int32, req []byte) ([]byte, error) + type Config struct + Dial func(network, ip string, port int) bool + Env []string + Exec func(path string, argv []string) bool + FS FS + FSAccess func(path string, write bool) bool + MaxMemoryBytes int + MemoryReserveBytes int + NetAccess func(op string) bool + PreopenDir string + Resolve func(host string) bool + Stderr io.Writer + Stdin io.Reader + StdlibDir string + Stdout io.Writer + type EvalResult struct + Error string + Ok bool + Result string + Stderr string + Stdout string + type FS = base.FS + type File = base.File + type Interpreter struct + func NewInterpreter(cfg Config) (inst *Interpreter, err error) + func (i *Interpreter) Close() error + func (i *Interpreter) Eval(src string) (EvalResult, error) + func (i *Interpreter) Interrupt() error + func (i *Interpreter) PrepareInterrupt() (*Interrupter, error) + type Interrupter struct + func (ip *Interrupter) Fire() + type MemFS = base.MemFS + func NewMemFS() *MemFS + func NewStdlibMemFS() (*MemFS, error) + type Module struct