Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Any difference between use and require regarding honoring prototype defined for sub? (prototype)

by Anonymous Monk
on Nov 19, 2012 at 18:13 UTC ( #1004600=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -le "sub f($$@@){warn qq{@_}} f(@ARGV,@ARGV,@ARGV); " 1 2 3 4 5
    5 5 1 2 3 4 5 at -e line 1.
    ...
    ## forward/early/prototype declaration
    $ perl -le " sub f($$@@); eval q{sub f($$@@){warn qq{@_}}}; f(@ARGV,@A
    +RGV,@ARGV); " 1 2 3 4 5
    5 5 1 2 3 4 5 at (eval 1) line 1.
    
  2. or download this
    $ echo foo() called too early to check prototype at file line 12 |spla
    +in
    foo() called too early to check prototype at file line 12  (#1)
        (W prototype) You've called a function that has a prototype before
    + the
    ...
        checking.  Alternatively, if you are certain that you're calling t
    +he
        function correctly, you may put an ampersand before the name to av
    +oid
        the warning.  See perlsub.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004600]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2014-04-20 09:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls