From 4469b61e3290813269678a16ba3508de086f6f0f Mon Sep 17 00:00:00 2001 From: doy Date: Tue, 3 Feb 2009 23:05:32 -0500 Subject: call new directly, not indirectly --- lib/IO/Pty/Easy.pm | 2 +- t/001-open-close.t | 2 +- t/002-spawn.t | 2 +- t/003-subprocess.t | 2 +- t/004-undefined-program.t | 2 +- 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"); -- cgit v1.2.3