Questo è ciò a cui credo tu ti riferisci!
sub new
{
my ($pkg, $computer, $user, $password) = @_;
if(isCompatibleWithIVAPI()!= 1){
my ($majorc ,$minorc, $releasec)= getIVAPICompatibilityVersions();
my $ivperlVersion= $VERSION;
my $ivapiVersion= getIVAPIVersion();
my $ivapicompVersion= sprintf("%1d.%1d.%03d",$majorc ,$minorc, $releasec);
print STDERR "\nThis InfoVista perl package version (",$ivperlVersion,") is not compatible with the version (",$ivapiVersion,") of IVAPI.dll. You must have at least IVAPI.DLL version ", $ivapicompVersion, "!!\n";
die;
}
my $session = {
"computer" => $computer,
"user" => $user,
"password" => $password,
};
bless $session, 'infovista';
$session->_initialize ();
return $session;
}