in reply to Re: Trouble getting started with Perl OO
in thread Trouble getting started with Perl OO

If I want to use named arguments, most of the time I just assign @_ to a hash (which works for the majority of the cases, where all you can pass are key value pairs). If I want to do any "parsing", I use Getopt::Long. Why reinvent the wheel?
  • Comment on Re^2: Trouble getting started with Perl OO

Replies are listed 'Best First'.
Re^3: Trouble getting started with Perl OO
by Roger (Parson) on Oct 07, 2004 at 12:55 UTC
    Well, it's doing more than key value pairs, it also allow traditional parameter passing methods.

    mysub( $v1, $v2, $v3, $v4 ); mysyb( -v1 => $v1, -v3 => $v3 );

    I like to have the freedom of using either calling convension. Just a personal preference.