[% setvar title Eliminate bareword filehandles. %]

This file is part of the Perl 6 Archive

Note: these documents may be out of date. Do not use as reference!

To see what is currently happening visit http://www.perl6.org/

TITLE

Eliminate bareword filehandles.

VERSION

  Maintainer: Peter Scott <peter@psdt.com>
  Date: 4 Aug 2000
  Last Modified: 29 Aug 2000
  Mailing List: perl6-language@perl.org
  Number: 33
  Version: 2
  Status: Frozen

ABSTRACT

Now that scalars (objects) can be used for filehandles, the bareword form should be eliminated.

DESCRIPTION

The venerable bareword form of the filehandle leads to code that is unnecessarily abstruse given that they can now be stored in scalars. Bareword filehandles are not lexical, and require the use of typeglobs and local to pass them to subroutines, concepts unnecessarily advanced for such a beginner-type operation.

IMPLEMENTATION

Easy, hopefully.

REFERENCES

"Typeglobs and Filehandles" in perlvar