tracks/perl5/exercises/leap/.meta/solutions/Leap.pm in trackler-2.2.1.179 vs tracks/perl5/exercises/leap/.meta/solutions/Leap.pm in trackler-2.2.1.180

- old
+ new

@@ -1,16 +1,14 @@ # Declare package 'Leap' with version -package Leap 3; +package Leap 4; use strict; use warnings; use Exporter 'import'; our @EXPORT_OK = qw(is_leap); sub is_leap { my $year = shift; - divisible_by($year, 400) - or divisible_by($year, 4) and !divisible_by($year, 100) - ? 1 : 0; + divisible_by($year, 400) or divisible_by($year, 4) and !divisible_by($year, 100); } sub divisible_by { $_[0] % $_[1] == 0 ? 1 : 0; }