in reply to Re^5: unquoted string error??!!
in thread unquoted string error??!!

You’re right that imported subs are the primary issue, since that’s too much like strange action at a distance. I don’t expect to hose myself so obviously as in the code I showed. There isn’t really a good solution, or a really good solution, or something like that.

As for using package-quoted names like IO::Handle::, I actually do it pretty regularly; it automatically cleans up problems that most people don’t ever want to know about.

We’ve known of this approach for a very long time now, so there’s no excuse not to use it. Perhaps better stated, I don’t consider general CPAN ignorance of it to be any excuse not to use it. What you don’t know can hurt you.

I’m sure there is no shortage of CPAN authors who neglect to check the return values of their close calls, too, but that isn’t going to stop me from religiously doing so. I try to apply more rigorous standards of correctness (or even advisability) than simply looking to majority practice. That’s too much like using Google to rank various misspellings to decide which one “must” be right.

Try it, you’ll like it. Who knows, you could even be a trend-setter.

Replies are listed 'Best First'.
Re^7: unquoted string error??!!
by chromatic (Archbishop) on May 05, 2011 at 01:58 UTC

    The only places I've ever seen bareword class names go wrong in practice is with single-element names such as CGI or (recently) JSON. Naming conventions can alleviate that, but that might be a good place to start.

    I remember the other reason I hesitated to do so: aliased. I'm not sure whether that's a pro or a con.