In CallFrame§
See primary documentation in context for method code
method code()
Return the callable code for the current block. When called on the object returned by callframe(0)
, this will be the same value found in &?BLOCK
.
my ;for ^3 ;say .code()
The $frame
variable will hold the Code
for the block inside the loop in this case.
In Backtrace::Frame§
See primary documentation in context for method code
method code(Backtrace::Frame)
Returns the code object into which .file
and .line
point, if available.
my = Backtrace.new;my = [0];say .code;