On Jul 14, 2004, at 3:18 PM, perl.org wrote:

OK, unless I'm missing something, I will only prototype my functions, not the
legacy code here.

We're trying to teach you Perl. Please remember that. It's why you are here.


Most of us Perl users aren't big on prototyping. As far as I'm concerned, it creates more issues than it solves.

You may feel differently.  Fine.  It's in the language.  Use away.

However, the prototyping that's built into Perl really has little to do with named parameters. I'm coming into this conversation late, so I didn't see what your problem is there. We typically use paired hash-like parameters for this in Perl land. It's a good fit, we think. Flexible but powerful.

If you need to validate your parameters to some criteria, please do so. If you find that too much work and only want to do it once, create a subroutine that does it for you. Move that subroutine into a module and you can use it everywhere. Throw it on the CPAN so we can too.

Welcome to Perl.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to