summaryrefslogtreecommitdiffstats
path: root/lib/IO/Pty/Easy.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IO/Pty/Easy.pm')
-rw-r--r--lib/IO/Pty/Easy.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/IO/Pty/Easy.pm b/lib/IO/Pty/Easy.pm
index ae0201a..9d2256a 100644
--- a/lib/IO/Pty/Easy.pm
+++ b/lib/IO/Pty/Easy.pm
@@ -300,10 +300,10 @@ Kills any subprocesses and closes the pty. No other operations are valid after t
sub close {
my $self = shift;
- return unless defined $self->{pty};
+ return unless $self->{pty};
$self->kill;
close $self->{pty};
- $self->{pty} = undef;
+ delete $self->{pty};
}
# }}}