develooper Front page | perl.perl5.porters | Postings from October 2013

Silent prototype mismatch

Thread Next
From:
Eric Brine
Date:
October 9, 2013 01:13
Subject:
Silent prototype mismatch
Message ID:
CALJW-qH=Q5rHiz3dBR34srM-A6s-KeoPD-pf4FW9RFuzAtMnng@mail.gmail.com
Does the following make sense?

>perl -wE"sub foo { bar('a','b'); } sub bar($$) { } foo(); say 'done'"
done

Another way to look at it:

>perl -wE"sub bar; sub bar($$) { } say 'done'"
done

>perl -wE"sub bar($); sub bar($$) { } say 'done'"
Prototype mismatch: sub main::bar ($) vs ($$) at -e line 1.
done

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About