Name

SPVM::CallerInfo - Information about a Caller

Description

CallerInfo class in SPVM represents information about a caller, such as the method name, the file name, and the line number.

Usage

my $caller = CallerInfo->new;

# Setters
$caller->set_name("Foo#bar");
$caller->set_file("Foo.spvm");
$caller->set_line(10);

# Getters
my $name = $caller->name;
my $file = $caller->file;
my $line = $caller->line;

Details

This class is automatically loaded.

Fields

name

has name : rw string;

The name of the caller. This is usually a method absolute name or a function name.

file

has file : rw string;

The file name where the caller is located.

line

has line : rw int;

The line number where the caller is located.

Class Methods

new

static method new : CallerInfo ();

Creates a new CallerInfo object and returns it.

Copyright & License

Copyright (c) 2026 Yuki Kimoto

MIT License