On Thu, Feb 9, 2017 at 9:39 AM, Simon Bauer <simo...@web.de> wrote:

> when I turn on -W in one of my perl scripts then I get a lot of warnings
> concerning Math::Complex
>
>  Prototype mismatch: sub Math::Complex::abs (_) vs none at
> /usr/share/perl/5.22/Math/Complex.pm line 667.
>  Prototype mismatch: sub Math::Complex::sqrt (_) vs none at
> /usr/share/perl/5.22/Math/Complex.pm line 718.
>

Not a big worry.  It  just means there's a
package Math::Complex;
sub sqrt()
{
...
}

in one place and one w/o parens
sub sqrt
{
...
}

elsewhere. The empty parens end up being treated as a subroutine prototype
(see perldoc perlsub) saying "no parameters" while the second allows the
same thing but doesn't enforce it via a prototype.  I believe there's a way
to turn on warnings but have it ignore prototype mismatches, if that'd
help.  I'd have to google that though.

-- 

a

Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk

Reply via email to