jforget / Astro-Sunrise

Astro-Sunrise: computing the time of sunrise and sunset for a given location on Earth and a given date
https://metacpan.org/pod/Astro::Sunrise
Other
2 stars 3 forks source link

Example in synopsis gives warnings [rt.cpan.org #102621] #12

Closed jforget closed 3 years ago

jforget commented 3 years ago

Migrated from rt.cpan.org#102621 (status was 'resolved')

Requestors:

Attachments:

From szabgab@cpan.org on 2015-03-07 14:13:06 :

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
jforget commented 3 years ago

Example script given on Saturday 2015-03-07 sunrise.pl.txt

jforget commented 3 years ago

Thursday 2015-03-12: issue is closed.