$self->mainstore( _defined_or( $hash{mainstore}, $cfg->val('MASTER','mainstore' ), 'cpanstats-%s.json' ));
$self->templates( _defined_or( $hash{templates}, $cfg->val('MASTER','templates' ) ));
to manage the creation of all the statistics graphs.
=item * storage
Method to return specific JSON data currently stored.
=cut
__PACKAGE__->mk_accessors(
qw( directory mainstore templates ad
d by the Pages module to create the leaderboard pages.
Previously this information was held in a JSON file, but maintaining accurate
data has been problematic.
Note that this package should not be c
:Basename;
use File::Copy;
use File::Path;
use File::Slurp;
use HTML::Entities;
use IO::File;
use JSON;
use Sort::Versions;
use Template;
#use Time::HiRes qw ( time );
use Time::Piece;
use Try::Tiny;
item * update_full
Full update of data and pages.
=item * update_data
Update data and store in JSON format.
=item * build_basics
Create the basic set of pages,those require no statistical calcula
return unless(-f $storage);
my $data = read_file($storage);
my $store = decode_json($data);
return $store->{$type};
}
# for $type (qw(stats dists fails perls pass pl