Show stats.pl syntax highlighted
#!/usr/bin/perl -w
BEGIN { use FindBin; use lib "$FindBin::Bin"; } # do not remove this, or the script will not work
my $BASECLASS = "PS"; # Base stats class name to use. If you've created a new class put it here
require $BASECLASS . ".pm"; # Load the base class
my $classdebug = 0; # toggles debugging output for any classes that are created
use strict;
use util;
use LoadConfig;
use Data::Dumper;
LoadConfig->ADDPATH($FindBin::Bin);
my $conf = {}; # ref to main config
my $lang = {}; # ref to language output strings
my $V;
my $ARGS = { # arguments for the PS object
DEBUG => $classdebug,
};
# $SIG{INT} = \&PS::DOEXIT;
my $stats = $BASECLASS->new($ARGS)->do_init($ARGS);
$conf = $stats->getobj('conf');
$lang = $stats->getobj('lang');
$V = $stats->getobj('verbose');
$V->print($lang->{initdone});
$stats->main; # do everything!
$V->print($lang->{end});
See more files for this project here