summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-02-03 03:17:02 -0500
committerdoy <doy@tozt.net>2009-02-03 03:17:02 -0500
commit1702788b834945ac554e10bc903ec40bdb429b47 (patch)
tree8945dceafd18425c827c1c071c3f070f91a1d4de
parent3f0c905e59b19947c392668baf37bd2bf7b1f1e4 (diff)
downloadio-pty-easy-1702788b834945ac554e10bc903ec40bdb429b47.tar.gz
io-pty-easy-1702788b834945ac554e10bc903ec40bdb429b47.zip
$self->close when the object is destroyed
-rw-r--r--lib/IO/Pty/Easy.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/IO/Pty/Easy.pm b/lib/IO/Pty/Easy.pm
index a67babc..7df04e3 100644
--- a/lib/IO/Pty/Easy.pm
+++ b/lib/IO/Pty/Easy.pm
@@ -314,6 +314,13 @@ sub _wait_for_inactive {
}
# }}}
+# DESTROY {{{
+sub DESTROY {
+ my $self = shift;
+ $self->close;
+}
+# }}}
+
# Ending documentation {{{
=head1 SEE ALSO