BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:

Given these compile options:

Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_64_BIT_I +NT USE_ITHREADS USE_LARGE_FILES USE_PERLIO Built under MSWin32

Can anyone tell me what function is being called here:

## perlio.c(592) v5.10.1 return (*tab->Dup)(aTHX_ PerlIO_allocate(aTHX), f, param, fla +gs);

And also, how did you track it down?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"

Replies are listed 'Best First'.
Re: Hunt the func
by ikegami (Patriarch) on Mar 16, 2010 at 23:29 UTC

    tab is a pointer to a PerlIO_funcs struct, a method lookup table. (Search for PERLIO_FUNCS_DECL, the core ones being in perlio.c.) Each PerlIO layer has one. You can get the handle's layers using PerlIO::get_layers($fh).

    >perl -le"print for PerlIO::get_layers(STDIN)" unix crlf