• Leigh B. Stoller's avatar
    * New libtmcc.pm module that encapsulates the tmcc interface. Most of the · 434a472a
    Leigh B. Stoller authored
      code that was in libsetup has moved into this library, and underwent a
      giant cleaning and pumping up. The interface from your typical perl
      script now looks like this:
      use libtmcc;
      if (tmcc(TMCCCMD_STATUS, "optional arguments", \@tmccresults) < 0) {
          warn("*** WARNING: Could not get status from server!\n");
          return -1;
      foreach my $me (@tmccresults) {
    	print "bite $me";
      The arguments and results are optional values. There is a fourth optional
      value that is a hash of config options (basically converted to command
      line switches passed to tmcc). For example, to set the timeout on an
      individual call, pass a fourth argument like:
    	("timeout" => 5)
      There is also a way to set global options so that all subsequent tmcc
      calls are affected:
    	configtmcc("timeout", 5);
      I'll probably clean this up a bit to avoid the direct strings.
      The result list is a list of strings. Since we are trending away...