diff options
author | doy <doy@tozt.net> | 2009-02-03 23:05:32 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-02-03 23:05:32 -0500 |
commit | 4469b61e3290813269678a16ba3508de086f6f0f (patch) | |
tree | 207676b5807d4f152203f77c8e7fca4d1391be03 | |
parent | e4edfa09f4414a55ed9bbaea09c0b04a7da689b1 (diff) | |
download | io-pty-easy-4469b61e3290813269678a16ba3508de086f6f0f.tar.gz io-pty-easy-4469b61e3290813269678a16ba3508de086f6f0f.zip |
call new directly, not indirectly0.04
-rw-r--r-- | lib/IO/Pty/Easy.pm | 2 | ||||
-rw-r--r-- | t/001-open-close.t | 2 | ||||
-rw-r--r-- | t/002-spawn.t | 2 | ||||
-rw-r--r-- | t/003-subprocess.t | 2 | ||||
-rw-r--r-- | t/004-undefined-program.t | 2 | ||||
-rw-r--r-- | t/010-read-write.t | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/lib/IO/Pty/Easy.pm b/lib/IO/Pty/Easy.pm index 5470ac6..ab6a51d 100644 --- a/lib/IO/Pty/Easy.pm +++ b/lib/IO/Pty/Easy.pm @@ -89,7 +89,7 @@ sub new { bless $self, $class; - $self->{pty} = new IO::Pty; + $self->{pty} = IO::Pty->new; $self->{handle_pty_size} = 0 unless POSIX::isatty(*STDIN); return $self; diff --git a/t/001-open-close.t b/t/001-open-close.t index 46ad7fc..8ea5c69 100644 --- a/t/001-open-close.t +++ b/t/001-open-close.t @@ -4,6 +4,6 @@ use warnings; use Test::More tests => 1; use IO::Pty::Easy; -my $pty = new IO::Pty::Easy; +my $pty = IO::Pty::Easy->new; $pty->close; ok(!defined($pty->{pty}), "closing a pty before a spawn"); diff --git a/t/002-spawn.t b/t/002-spawn.t index ed0fd95..6924f85 100644 --- a/t/002-spawn.t +++ b/t/002-spawn.t @@ -4,7 +4,7 @@ use warnings; use Test::More tests => 5; use IO::Pty::Easy; -my $pty = new IO::Pty::Easy; +my $pty = IO::Pty::Easy->new; $pty->spawn("$^X -ple ''"); ok($pty->is_active, "spawning a subprocess"); ok($pty->kill(0, 1), "subprocess actually exists"); diff --git a/t/003-subprocess.t b/t/003-subprocess.t index 352b7b4..cc87025 100644 --- a/t/003-subprocess.t +++ b/t/003-subprocess.t @@ -4,7 +4,7 @@ use warnings; use Test::More tests => 2; use IO::Pty::Easy; -my $pty = new IO::Pty::Easy; +my $pty = IO::Pty::Easy->new; my $script = << 'EOF'; $| = 1; if (-t *STDIN && -t *STDOUT) { print "ok" } diff --git a/t/004-undefined-program.t b/t/004-undefined-program.t index 5b398c6..335a415 100644 --- a/t/004-undefined-program.t +++ b/t/004-undefined-program.t @@ -4,7 +4,7 @@ use warnings; use Test::More tests => 2; use IO::Pty::Easy; -my $pty = new IO::Pty::Easy; +my $pty = IO::Pty::Easy->new; eval { local $SIG{ALRM} = sub { die "alarm\n" }; alarm 5; diff --git a/t/010-read-write.t b/t/010-read-write.t index 8e401ad..fca876d 100644 --- a/t/010-read-write.t +++ b/t/010-read-write.t @@ -4,7 +4,7 @@ use warnings; use Test::More tests => 1; use IO::Pty::Easy; -my $pty = new IO::Pty::Easy; +my $pty = IO::Pty::Easy->new; $pty->spawn("$^X -ple ''"); $pty->write("testing\n"); |