It certainly isn't an interface *to* IO::Handle,

You can use it to calls methods in IO::Handle, so yeah, it is.

<mauke> CORE::open is an interface to IO::Handle // also, IO::Handle is from 5.003; three-arg open is from 5.6 // clearly open is more modern

Older = worse? nah, bad argument. The older module could be worse, but it's not because it's older.

It's not like it's not maintained either. IO::File uses 3-arg open when possible.

[Quoting IO::Handle,] Which means you can't derive your own class from IO::Handle and inherit those methods.

That makes no sense. That's exactly what IO::File does.

ok 3 - fh is a reference ## base type glob

open's file handle *can* be a reference to a glob, but it can also be a glob.

The glob can be magical (including tied) or not.

The reference can be unblessed or blessed to any package.

I feel as strongly as ever [...] that all FH should utilize IO::File

I don't see where you explain why. What are the advantages of

my $fh = IO::File->new($qfn, 'r') or die("Can't open file \"$qfn\": $!\n");
over
open(my $fh, '<', $qfn) or die("Can't open file \"$qfn\": $!\n");

I have to load a module, create an object and learn a new permission notation just to end up calling open like I would anyway.


In reply to Re: IO::File vs CORE::open by ikegami
in thread IO::File vs CORE::open by EvanCarroll

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.