Consider for example the perl's "read" in perlfunc, it expects a SCALAR as its second argument to use as the buffer into which the characters will be read. Thats work because in perl a subroutine decide if its arguments are received by value or by reference.
For example, when you bind the "IO::Handle" module, JSPL engine will search for a file JSPL/Tweaks/IO/Handle.js in every directory in
@INC. That file should returns an Object with the wrapper needed for the
IO::Handle's "read" method.