Re: Arguments checker module

2009-05-07 Thread David Cantrell
On Wed, May 06, 2009 at 10:42:00AM -0700, Jonathan Leto wrote: Wow, I was taken aback when I read not interested in changing/fixing Perl itself. Ever heard of technical debt? You can feel it every time you type my ($self) = @_. Also, Perl 5 doesn't have OO, it has blessed scalars. Just

Re: Arguments checker module

2009-05-07 Thread David Cantrell
On Wed, May 06, 2009 at 11:40:26AM -0700, Jonathan Leto wrote: Jonathan forgot to attribute whoever wrote: 1. Not every module you're using will be Moose-based, so if you're working on one of those, you'll need to remember to switch back and forth. It's bad enough having both (Perl's

Re: Arguments checker module

2009-05-06 Thread Bill Ward
Do you mean Parse::Method::Signatures ? On Tue, May 5, 2009 at 10:54 PM, breno oainikus...@gmail.com wrote: On Wed, May 6, 2009 at 12:04 AM, Bill Ward b...@wards.net wrote: Params::Validate has the right features, but I really don't like the verbosity of its configuration. I was hoping

Re: Arguments checker module

2009-05-06 Thread breno
On Wed, May 6, 2009 at 2:59 AM, Bill Ward b...@wards.net wrote: Do you mean Parse::Method::Signatures ? No, I mean http://search.cpan.org/perldoc?Method::Signatures http://www.slideshare.net/schwern/methodsignatures-presentation I haven't looked at it much, but it seems to fill most of your

Re: Arguments checker module

2009-05-06 Thread Bill Ward
On Tue, May 5, 2009 at 11:48 PM, breno oainikus...@gmail.com wrote: On Wed, May 6, 2009 at 2:59 AM, Bill Ward b...@wards.net wrote: Do you mean Parse::Method::Signatures ? No, I mean http://search.cpan.org/perldoc?Method::Signatures

Re: Arguments checker module

2009-05-06 Thread Jonathan Rockway
You seem to hate everything. I am confused as to why people even waste their time trying to help you. * On Wed, May 06 2009, Bill Ward wrote: 1. Same problem as Moose - it changes the language too much for my taste.  I don't see what all the fuss is about declaring $self. Most people want to

Re: Arguments checker module

2009-05-06 Thread David Golden
On Wed, May 6, 2009 at 6:50 AM, Jonathan Rockway j...@jrock.us wrote: You seem to hate everything.  I am confused as to why people even waste their time trying to help you. [snip] Anyway, embrace modules.  They are the reason to use Perl. I think Bill gets Perl. (c.f.

Re: Arguments checker module

2009-05-06 Thread Hans Dieter Pearcey
On Wed, May 06, 2009 at 07:10:49AM -0400, David Golden wrote: I don't think he deserves public scorn in response to a reasonable question and reasonable objections to suggestions. I agree about the public scorn, but I disagree that Perl 5's OO is fine is reasonable. It's horrible; we just all

Re: Arguments checker module

2009-05-06 Thread Bill Ward
On Wed, May 6, 2009 at 6:38 AM, Hans Dieter Pearcey hdp.perl.module-auth...@weftsoar.net wrote: On Wed, May 06, 2009 at 07:10:49AM -0400, David Golden wrote: I don't think he deserves public scorn in response to a reasonable question and reasonable objections to suggestions. I agree about

Re: Arguments checker module

2009-05-06 Thread Jonathan Leto
Howdy, Thanks guys for sticking up for me.  I am just old-fashioned, I guess; for better or for worse, I'm not interested in changing/fixing Perl itself, just in finding writing reusable code that meets my needs without adding stuff that doesn't. Wow, I was taken aback when I read not

Re: Arguments checker module

2009-05-06 Thread Bill Ward
On Wed, May 6, 2009 at 10:42 AM, Jonathan Leto jal...@gmail.com wrote: Howdy, Thanks guys for sticking up for me. I am just old-fashioned, I guess; for better or for worse, I'm not interested in changing/fixing Perl itself, just in finding writing reusable code that meets my needs

Re: Arguments checker module

2009-05-06 Thread Hans Dieter Pearcey
On Wed, May 06, 2009 at 11:27:05AM -0700, Bill Ward wrote: 1. Not every module you're using will be Moose-based, so if you're working on one of those, you'll need to remember to switch back and forth. It's bad enough having both (Perl's approximation of) OO and procedural calls. If you're

Re: Arguments checker module

2009-05-06 Thread Jonathan Leto
Howdy, There are a couple of big problems with adopting Moose or one of the similar redesigns of Perl OO. You mean implementing OO in Perl, but I get it. 1. Not every module you're using will be Moose-based, so if you're working on one of those, you'll need to remember to switch back and

Re: Arguments checker module

2009-05-06 Thread Bill Ward
On Wed, May 6, 2009 at 3:54 PM, Paul LeoNerd Evans leon...@leonerd.org.ukwrote: On Wed, 6 May 2009 11:27:05 -0700 Bill Ward b...@wards.net wrote: (Perl's approximation of) OO I've often seen this one bandied about, and I can't say I agree with it. Neither do I, but I threw the

Arguments checker module

2009-05-05 Thread Bill Ward
Is anyone aware of any modules that will check subroutine arguments? I can think of two similar features of Perl, but neither is quite right: 1. Prototypes (perlsyn) - put something like ($$@) after your subroutine declaration - but doesn't work for object methods and a few other cases. Plus,

Re: Arguments checker module

2009-05-05 Thread Hans Dieter Pearcey
On Tue, May 05, 2009 at 07:51:09PM -0700, Bill Ward wrote: I'm often having to add a half dozen lines of code to every subroutine to perform argument validation and I'd like to offload it once and for all into a CPAN module. Has anyone written or seen such a beast? I haven't, so I've started

Re: Arguments checker module

2009-05-05 Thread Dave Rolsky
On Tue, 5 May 2009, Bill Ward wrote: I'm often having to add a half dozen lines of code to every subroutine to perform argument validation and I'd like to offload it once and for all into a CPAN module. Has anyone written or seen such a beast? I haven't, so I've started writing it... but

Re: Arguments checker module

2009-05-05 Thread Bill Ward
On Tue, May 5, 2009 at 7:55 PM, Hans Dieter Pearcey hdp.perl.module-auth...@weftsoar.net wrote: On Tue, May 05, 2009 at 07:51:09PM -0700, Bill Ward wrote: I'm often having to add a half dozen lines of code to every subroutine to perform argument validation and I'd like to offload it once

Re: Arguments checker module

2009-05-05 Thread Bill Ward
On Tue, May 5, 2009 at 7:55 PM, Dave Rolsky auta...@urth.org wrote: On Tue, 5 May 2009, Bill Ward wrote: I'm often having to add a half dozen lines of code to every subroutine to perform argument validation and I'd like to offload it once and for all into a CPAN module. Has anyone written

Re: Arguments checker module

2009-05-05 Thread Hans Dieter Pearcey
On Tue, May 05, 2009 at 08:04:35PM -0700, Bill Ward wrote: I'm not interested in being locked-in to a framework like Moose, so I won't even consider those. http://search.cpan.org/~drolsky/Moose-0.77/lib/Moose/Util/TypeConstraints.pm#Use_with_Other_Constraint_Modules Moose's type constraints

Re: Arguments checker module

2009-05-05 Thread Bill Ward
On Tue, May 5, 2009 at 8:27 PM, Hans Dieter Pearcey hdp.perl.module-auth...@weftsoar.net wrote: On Tue, May 05, 2009 at 08:04:35PM -0700, Bill Ward wrote: I'm not interested in being locked-in to a framework like Moose, so I won't even consider those.

Re: Arguments checker module

2009-05-05 Thread breno
On Wed, May 6, 2009 at 12:04 AM, Bill Ward b...@wards.net wrote: Params::Validate has the right features, but I really don't like the verbosity of its configuration.  I was hoping for something more like the Perl prototyping or Getopt::Long syntax.  Maybe I'll write a wrapper around