HEX
Server: Apache
System: Linux sh00085.hostgator.com 5.14.0-687.29.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 23 16:18:48 EDT 2026 x86_64
User: yqegzjte (1064)
PHP: 8.5.8
Disabled: NONE
Upload Files
File: //usr/share/perl5/vendor_perl/Object/Remote/GlobProxy.pm
use strictures 1;

package Object::Remote::GlobProxy;
require Tie::Handle;
our @ISA = qw( Tie::Handle );

sub TIEHANDLE {
  my ($class, $glob_container) = @_;
  return bless { container => $glob_container }, $class;
}

my @_delegate = (
  [READLINE => sub { wantarray ? $_[0]->getlines : $_[0]->getline }],
  (map { [uc($_), lc($_)] } qw(
    write
    print
    printf
    read
    getc
    close
    open
    binmode
    eof
    tell
    seek
  )),
);

for my $delegation (@_delegate) {
  my ($from, $to) = @$delegation;
  no strict 'refs';
  *{join '::', __PACKAGE__, $from} = sub {
    $_[0]->{container}->$to(@_[1 .. $#_]);
  };
}

1;