in reply to Re: Perl6::FH
in thread (updated) Perl6::FH

I can't use the same handle, because that's what's getting tied. I'm duplicating the file descriptor.
# this is what happens when I change # bless [ $fh, (@_ == 3 ? $sep : ()) ], $class; # to # bless [ $real, (@_ == 3 ? $sep : ()) ], $class; Deep recursion on subroutine "Perl6::FH::AUTOLOAD" at /usr/local/lib/p +erl5/5.6.0/Tie/Handle.pm line 202. Deep recursion on subroutine "Tie::StdHandle::EOF" at /export/home/jpi +nyan/lib/Perl6/FH.pm line 40. Segmentation fault


japhy -- Perl and Regex Hacker

Replies are listed 'Best First'.
Re: Re: Re: Perl6::FH
by John M. Dlugosz (Monsignor) on Jun 29, 2001 at 01:04 UTC
    OK, because you can't call the underlying readline otherwise. I thought there was a find-the-thing-I'm-tied-to function somewhere? Ah, found it: tied "Returns a reference to the object underlying VARIABLE (the same value that was originally returned by the tie call that bound the variable to a package.)"

    —John