Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: My coding guidelines

by Abigail-II (Bishop)
on Nov 26, 2002 at 09:49 UTC ( [id://215810]=note: print w/replies, xml ) Need Help??


in reply to Re: My coding guidelines
in thread My coding guidelines

You can't use prototypes to have the compiler check whether an argument is an integer, or an object of a certain type. Prototypes are less useful than you might think at first, and they are sometimes bloody nasty. The following doesn't do what you want:
sub foo ($$) {....} my @bar = (1, 2); foo @bar;
&foo isn't called with two arguments - even while @bar has two elements. Remove the prototype, and it will work as expected.

Abigail

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-29 11:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found