Help for this page

Select Code to Download


  1. or download this
    package PerlSvc;
    use Win32::Service;
    ...
    use DBI;
    use DBD::ODBC;
    use Win32::EventLog;
    
  2. or download this
    # the short name by which your service will be known (cannot be 'my')
    
  3. or download this
    ${$_}{'CurrentState'}
    
  4. or download this
    $dsn="driver=\{SQL Server\}\;Server=$srv\;UID\=$uid\;PWD\=$pwd\;";
    
  5. or download this
        $exec=$dbh->prepare("...");
        $exec->execute;
    
  6. or download this
    $exec=$dbh->prepare("... values ('$cn', '$sname', $state)");
    
  7. or download this
        $exec->finish;}else{
    
  8. or download this
    }
    }else
    
  9. or download this
            unless (${$_} eq "1"){
    
  10. or download this
                $dsn="driver=\{SQL Server\}\;Server=$srv\;UID\=$uid\;PWD\=
    +$pwd\;";
    
  11. or download this
    }
    sleep(5);
    }
    }
    
  12. or download this
        Win32::Service::GetServices("", \%tmp);
    ...
                if (Win32::Service::GetStatus("",$_,\%{$_})){
    
  13. or download this
    "$DisplayName"
    
  14. or download this
    print "No help available.\n";