package IeExisting; use Win32::IEAutomation; @IeExisting::ISA='Win32::IEAutomation'; sub _startIE{ my ($self, $visible, $maximize) = @_; defined $self->{agent} and return; $self->{agent} = Win32::OLE->GetActiveObject('InternetExplorer.Application') || Win32::OLE->new("InternetExplorer.Application") || die "Could not start Internet Explorer Application through OLE\n"; Win32::OLE->Option(Warn => 0); Win32::OLE->WithEvents($self->{agent}); $self->{agent}->{Visible} = $visible; if ($maximize){ my $clicker = Win32::IEAutomation::WinClicker->new(); $clicker->maximize_ie(); undef $clicker; } return $self; } ...