bareword::filehandles(3pm)

bareword::filehandles3pm

Disables bareword filehandles

Usage

    no bareword::filehandles;
    open FH, $file            # dies
    open my $fh, $file;       # doesn't die
    print FH $string          # dies
    print STDERR $string      # doesn't die

Version

version 0.007

Overview

This module lexically disables the use of bareword filehandles with builtin functions, except for the special builtin filehandles "STDIN", "STDOUT", "STDERR", "ARGV", "ARGVOUT" and "DATA".

Methods

unimport

Disables bareword filehandles for the remainder of the scope being compiled.

import

Enables bareword filehandles for the remainder of the scope being compiled.

Limitations

Filetest operators ("-X") can not be checked on Perl versions before 5.32, because hooking the op check function for these breaks stacked tests, e.g. "-f -w -x $file".

Releases

7 releases since Debian 7 (Wheezy); the text changed 6 times.

  1. 7
  2. 8
  3. 9
  4. 10
  5. 11
  6. 12
  7. 13

Author

Dagfinn Ilmari Mannsåker <[email protected]>

From libbareword-filehandles-perl 0.007-2+b4 in Debian 13 (Trixie). Parsed by carta from the page's man source.