Expect
view release on metacpan or search on metacpan
lib/Expect.pm view on Meta::CPAN
697071727374757677787980818283848586878889}
sub
new {
my
(
$class
,
@args
) =
@_
;
$class
=
ref
(
$class
)
if
ref
(
$class
);
# so we can be called as $exp->new()
# Create the pty which we will use to pass process info.
my
(
$self
) = IO::Pty->new;
die
"$class: Could not assign a pty"
unless
$self
;
bless
$self
=>
$class
;
$self
->autoflush(1);
# This is defined here since the default is different for
# initialized handles as opposed to spawned processes.
${
*$self
}{exp_Log_Stdout} = 1;
$self
->_init_vars();
if
(
@args
) {
# we got add'l parms, so pass them to spawn
( run in 0.229 second using v1.01-cache-2.11-cpan-55f5a4728d2 )