http://www.perlmonks.org?node_id=814824


in reply to Re^4: Regarding STDOUT and indirect object notation for print
in thread Regarding STDOUT and indirect object notation for print

Thanks.. though, I understood that it (the use statement) would be required for something I explicitly created in code.

I was just thrown off by the built-in nature of STDOUT and its ilk; I thought perhaps IO::Handle would have already been 'used', thus the methods would've been available, but that somehow I wasn't doing it "right". Thanks for the example.

  • Comment on Re^5: Regarding STDOUT and indirect object notation for print

Replies are listed 'Best First'.
Re^6: Regarding STDOUT and indirect object notation for print
by kennethk (Abbot) on Dec 29, 2009 at 21:49 UTC
    Would you want perl to load the entire Core module set before running a one-liner?

      Well that's a major exaggeration. The cost of loading IO::Handle would be quite small if it was rewritten in C. (100 bytes?) In fact, there already exists modules whose methods are built right into Perl: utf8, version and UNIVERSAL, for example.

        It is an exaggeration, but there was clearly a design decision to keep perl lean and mean. Just trying to make a point succinctly, and histrionics seemed an easy way to do it.

        It does seems odd to me that they'd include the implicit blessing without populating the namespace. I suppose it's a nod to the roll-your-own option.

      Not the entire Core, but I'm surprised that the module for an available object wouldn't be loaded to assist handling that object.