move functions at the bottom
and turn the main script into a modulino
This commit is contained in:
parent
40407e9604
commit
e923b1106a
10
script.pl
10
script.pl
@ -9,6 +9,12 @@ use WWW::Mechanize ();
|
|||||||
|
|
||||||
use experimental qw/ signatures /;
|
use experimental qw/ signatures /;
|
||||||
|
|
||||||
|
unless(caller) {
|
||||||
|
my $ts = get_mersenne_results();
|
||||||
|
|
||||||
|
generate_output_table($ts)->draw;
|
||||||
|
}
|
||||||
|
|
||||||
sub get_mersenne_results() {
|
sub get_mersenne_results() {
|
||||||
|
|
||||||
# log in to Mersenne.org and get results for the last year
|
# 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;
|
return $te->first_table_found;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $ts = get_mersenne_results();
|
|
||||||
|
|
||||||
generate_output_table($ts)->draw;
|
|
||||||
|
|
||||||
sub generate_output_table ($ts) {
|
sub generate_output_table ($ts) {
|
||||||
|
|
||||||
# group GHZ Days results by computer, compute GHZ Days per Day (GHZ Days / Days)
|
# group GHZ Days results by computer, compute GHZ Days per Day (GHZ Days / Days)
|
||||||
|
Loading…
Reference in New Issue
Block a user