Subject: | Example in synopsis gives warnings |
Using the attached file (which is based on the synopsis) I got the following warnings:
$ perl examples/sunrise.pl
Argument "year" isn't numeric in integer multiplication (*) at /Users/gabor/perl5/perlbrew/perls/perl-5.20.1_WITH_THREADS/lib/site_perl/5.20.1/Astro/Sunrise.pm line 309.
Argument "month" isn't numeric in integer addition (+) at /Users/gabor/perl5/perlbrew/perls/perl-5.20.1_WITH_THREADS/lib/site_perl/5.20.1/Astro/Sunrise.pm line 309.
Argument "day" isn't numeric in multiplication (*) at /Users/gabor/perl5/perlbrew/perls/perl-5.20.1_WITH_THREADS/lib/site_perl/5.20.1/Astro/Sunrise.pm line 319.
Argument "day" isn't numeric in multiplication (*) at /Users/gabor/perl5/perlbrew/perls/perl-5.20.1_WITH_THREADS/lib/site_perl/5.20.1/Astro/Sunrise.pm line 319.
Argument "day" isn't numeric in multiplication (*) at /Users/gabor/perl5/perlbrew/perls/perl-5.20.1_WITH_THREADS/lib/site_perl/5.20.1/Astro/Sunrise.pm line 319.
Argument "day" isn't numeric in multiplication (*) at /Users/gabor/perl5/perlbrew/perls/perl-5.20.1_WITH_THREADS/lib/site_perl/5.20.1/Astro/Sunrise.pm line 319.
Argument "day" isn't numeric in multiplication (*) at /Users/gabor/perl5/perlbrew/perls/perl-5.20.1_WITH_THREADS/lib/site_perl/5.20.1/Astro/Sunrise.pm line 319.
Argument "day" isn't numeric in multiplication (*) at /Users/gabor/perl5/perlbrew/perls/perl-5.20.1_WITH_THREADS/lib/site_perl/5.20.1/Astro/Sunrise.pm line 319.
Argument "day" isn't numeric in multiplication (*) at /Users/gabor/perl5/perlbrew/perls/perl-5.20.1_WITH_THREADS/lib/site_perl/5.20.1/Astro/Sunrise.pm line 319.
Argument "day" isn't numeric in multiplication (*) at /Users/gabor/perl5/perlbrew/perls/perl-5.20.1_WITH_THREADS/lib/site_perl/5.20.1/Astro/Sunrise.pm line 319.
Argument "day" isn't numeric in multiplication (*) at /Users/gabor/perl5/perlbrew/perls/perl-5.20.1_WITH_THREADS/lib/site_perl/5.20.1/Astro/Sunrise.pm line 319.
08:10
20:40
Adding a Carp::confess($year) call to line 309 I got the following output:
year at /Users/gabor/perl5/perlbrew/perls/perl-5.20.1_WITH_THREADS/lib/site_perl/5.20.1/Astro/Sunrise.pm line 309.
Astro::Sunrise::days_since_2000_Jan_0("year", 2015, "month") called at /Users/gabor/perl5/perlbrew/perls/perl-5.20.1_WITH_THREADS/lib/site_perl/5.20.1/Astro/Sunrise.pm line 52
Astro::Sunrise::sunrise("year", 2015, "month", 9, "day", 2, "lon", -3.6, "lat", ...) called at examples/sunrise.pl line 7
Subject: | sunrise.pl |
use strict;
use warnings;
use 5.010;
use Astro::Sunrise;
my ($sunrise, $sunset) = sunrise(
year => 2015, month => 9, day => 2,
lon => -3.6, lat => 37.17,
tz => 1, dst => 1);
say $sunrise;
say $sunset;