In CallFrameĀ§
See primary documentation in context for method file
method file()
This is a shortcut for looking up the file
annotation. Therefore, the following code prints True
.
my = callframe(0);say .file eq .annotations<file>;
In CodeĀ§
See primary documentation in context for method file
method file(Code: --> Str)
Returns the name of the file in which the code object was declared.
say :<+>.file; # OUTPUT: Ā«SETTING::src/core.c/Numeric.rakumodā¤Ā»
In LabelĀ§
See primary documentation in context for method file
Returns the file the label is defined in.
In Backtrace::FrameĀ§
See primary documentation in context for method file
method file(Backtrace::Frame --> Str)
Returns the file name.
my = Backtrace.new;my = [0];say .file;