```{index} single: getlines_common; IO function ``` ```{index} single: IO::getlines_common; Perl function ``` # getlines_common Common implementation for getlines/getline/gets. ix=0 → getlines (list context, croak if scalar) ix=1 → getline/gets (scalar context) `IO.xs:520-565` constructs a fake UNOP with op_ppaddr=PL_ppaddr[`OP_READLINE`] and calls CALLRUNOPS. This is deeply tied to perl5's internal op machinery. DEVIATION: We use eval_pv to read via <`$fh`>. The `IO.xs` XS versions exist to work around a lexical hints propagation issue with perl5's pure-Perl getline/getlines in `IO::Handle.pm`. Since our C runtime handles hints natively, this workaround achieves the same result.