in reply to (updated) Perl6::FH
One thing I noticed, and I don't know if this comes down to coding style, personal preference, or a significant syntax problem:
The use of "@_ == 3" to determine the existence of the optional 3rd parameter seems to be a bit questionable. I would think that using "defined( $sep )" would be a better choice, as even if I called this function with more than 3 arguements, I know that the 4th and beyond would be ignored, but the function still takes in the 3rd. In your fashion, 4 arguements would prevent the third from being used. Am I missing something in this usage?return bless [ undef, 1, @_ == 3 ? $sep : () ], "${class}::ARGV" if $real == \*ARGV; ... bless [ $fh, (@_ == 3 ? $sep : ()) ], $class;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: (updated) Perl6::FH
by japhy (Canon) on Jun 28, 2001 at 20:47 UTC | |
by Masem (Monsignor) on Jun 28, 2001 at 21:07 UTC |