move functions at the bottom

and turn the main script into a modulino
main
Yanick Champoux 2023-08-26 10:29:15 -04:00
parent 40407e9604
commit e923b1106a
1 changed files with 6 additions and 4 deletions

View File

@ -9,6 +9,12 @@ use WWW::Mechanize ();
use experimental qw/ signatures /;
unless(caller) {
my $ts = get_mersenne_results();
generate_output_table($ts)->draw;
}
sub get_mersenne_results() {
# log in to Mersenne.org and get results for the last year
@ -40,10 +46,6 @@ sub get_mersenne_results() {
return $te->first_table_found;
}
my $ts = get_mersenne_results();
generate_output_table($ts)->draw;
sub generate_output_table ($ts) {
# group GHZ Days results by computer, compute GHZ Days per Day (GHZ Days / Days)