Very nice, very nice...

One thing I noticed, and I don't know if this comes down to coding style, personal preference, or a significant syntax problem:

return bless [ undef, 1, @_ == 3 ? $sep : () ], "${class}::ARGV" if $real == \*ARGV; ... bless [ $fh, (@_ == 3 ? $sep : ()) ], $class;
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?


Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain

In reply to Re: (updated) Perl6::FH by Masem
in thread (updated) Perl6::FH by japhy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.