4 has handle => (is => 'rw');
5 has valueref => (is => 'ro', default => sub {
10 sub write { my $self = shift; print { $self->handle } @_ }
12 sub getvalue { ${ $_[0]->valueref } }
15 open my $fh, '>', $_[0]->valueref
16 or die "Unable to open in-memory file: $!\n";
21 open my $fh, '<', $_[1]
22 or die "Unable to open in-memory file: $!\n";