On Fri, 2008-10-10 at 13:31 +0100, Deviloper wrote: > I either don´t like prototyping in perl, > but I hate user who don´t read what my methode or function want much > more then prototypes. (This error cost me SO much time... every day > there calls somebody... "your sub don´t work"... only because he/she > passes $ $ instead of $ $ $.) > (I don´t like writing input checks for every methode, too^^) > > Hope to see c++/java like polymorphism some day in perl. >
Don't use prototypes. When you need them, you really need them. That's why they're there. But ( 1 - 1e-42 ) percent of the time you don't need them. Don't validate parameters for a sub. Assume the people using it are adults and are capable of acting in a responsible manner. Don't let them push their workload on you. The correct methodology is: 1. Get the input. 2. Validate the input. 3. Process the data. 4. Write the output. The only validation is the input data, not in each sub. -- Just my 0.00000002 million dollars worth, Shawn Linux is obsolete. -- Andrew Tanenbaum -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/