Questions about this topic? Sign up to ask in the talk tab.

Perl/Helpful Libraries/Throughput

From NetSec
(Redirected from Download throughput)
Jump to: navigation, search

Throughput is a library that provides abstraction for sockets, logging, and simple configuration.


Download Throughput


To set up your development environment for Throughput, you'll need to put the contents of Throughput.tgz in your perl include directory or put the Throughput directory in the same directory as the application you are developing.

  • A simple config parser
use Throughput::Config qw(parse);
my %config = Throughput::parse('config.conf');
  • The config file should be formatted as:
 variable=value # comment
  • The %config hash will return as :

  • A simple logger
my $logger = new Log();
$logger->error("an error has occured");
  • Output defaults to STDERR but can be set to files in the constructor or using accessors.
  • Log also supports info, warn and digest:
$logger->info("info message");
There is also a digest log, which is never called externally, but the output of info warn and error are all outputted to the digest file, set with:

Notice: This segment will be updated with documentation in the next 24 hours; apologies for the delay. The code itself has been completed and seasoned perl developers should be able to implement it quickly.