The following returns the B<names> of the PerlIO layers on a filehandle.
- my @layers = PerlIO::get_layers($fh);
- # You can use also FH or *FH, the bare FH doesn't pass 'use strict'.
+ my @layers = PerlIO::get_layers($fh); # Or FH, *FH, "FH".
The layers are returned in the order an open() or binmode() call would
use them. Note that the stack begins (normally) from C<stdio> or from
newXSproto("Internals::SvREFCNT",XS_Internals_SvREFCNT, file, "\\[$%@];$");
newXSproto("Internals::hv_clear_placeholders",
XS_Internals_hv_clear_placehold, file, "\\%");
- newXS("PerlIO::get_layers", XS_PerlIO_get_layers, file);
+ newXSproto("PerlIO::get_layers",
+ XS_PerlIO_get_layers, file, "*;@");
}