diff --git a/script.pl b/script.pl index e36225d..941d075 100644 --- a/script.pl +++ b/script.pl @@ -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)