-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tied filehandles need a PerlIO::get_layers interface #11784
Comments
From @xdgCreated by @xdgTied filehandles have BINMODE to modify layers on filehandle, Tied filehandles should support a GET_LAYERS method that This change to core would also require updating Tie::Handle Perl Info
|
From @HugmeirThis should probably be called GETARG, since that's what PerlIO::via uses. |
The RT System itself - Status changed from 'new' to 'open' |
From @xdgOn Fri, Dec 2, 2011 at 10:13 PM, Brian Fraser <fraserbn@gmail.com> wrote:
I don't see how that relates. Tie *STDOUT with Tie::StdHandle. Apply ":utf8" to it with binmode N.B. you *can* see the ":utf8" layer if you do this: PerlIO::get_layers(tied *STDOUT) if tied(*STDOUT) && (reftype tied That's unreasonably breaks the intended transparency of tied handles. A tied filehandle needs to have a method that PerlIO::get_layers can In Tie::StdHandle, it would look like this sub GET_LAYERS { PerlIO::get_layers($_[0]) } just like all the rest of the methods there. (PerlIO would have to be -- David |
From @LeontOn Sat, Dec 3, 2011 at 4:01 AM, David Golden <perlbug-followup@perl.org> wrote:
If you ask me, tied filehandles need to *be* a PerlIO layer, instead Leon |
From @LeontOn Sat, Dec 3, 2011 at 4:30 AM, David Golden <xdaveg@gmail.com> wrote:
Technically speaking it doesn't. PerlIO::get_layers is one of those Leon |
From @xdgOn Sat, Dec 3, 2011 at 7:32 AM, Leon Timmermans <fawaka@gmail.com> wrote:
Ah. It's not documented to indicate that. -- David |
From @LeontOn Sat, Dec 3, 2011 at 3:48 PM, David Golden <xdaveg@gmail.com> wrote:
Which is a good reason not to make any such assumption in a non-core module ;-) Leon |
From @davidnicolCold the requested feature be implemented by addding a tied check to |
From @xdgOn Sat, Dec 3, 2011 at 11:53 PM, David Nicol <davidnicol@gmail.com> wrote:
There's no guarantee that the underlying object is a blessed globref. Querying an underlying blessed globref might be a reasonable fallback,
That's a bad idea, because you can't call binmode() on that. The goal For example, in Capture::Tiny (where I discovered this issue), I need -- David |
Migrated from rt.perl.org#105232 (status was 'open')
Searchable as RT105232$
The text was updated successfully, but these errors were encountered: