in reply to Re: Can't clone STD handle with :via layer
in thread Can't clone STD handle with :via layer

As i correctly understand '>&' - is standard technique to clone handle.

I use Capture::Tiny, which clone all STD handles on each call. Probably other CPAN code may use handle cloning too. So i wish to understand, why cloning with :via layer not working.

Maybe something missing in PerlIO::via::QuotedPrint - which prevents cloning normally?

  • Comment on Re^2: Can't clone STD handle with :via layer

Replies are listed 'Best First'.
Re^3: Can't clone STD handle with :via layer
by tobyink (Canon) on Apr 08, 2014 at 15:07 UTC

    It's nothing specific to PerlIO::via::QuotedPrint; it seems to happen with all PerlIO::via::* modules, but not with built-in layers like :unix, :utf8, or :encoding(iso-8859-1).

    Update: indeed, the error message is generated within PerlIO::via. Here's the relevant code.

    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
      Maybe it makes a sense to create issue in perl rt?