Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

bareword::filehandles

Name bareword::filehandles
Version 0.007
Located at /usr/local/lib64/perl5
File /usr/local/lib64/perl5/bareword/filehandles.pm
Is Core No
Search CPAN for this module bareword::filehandles
Documentation bareword::filehandles
Module Details bareword::filehandles


NAME

bareword::filehandles - disables bareword filehandles


VERSION

version 0.007


SYNOPSIS

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


DESCRIPTION

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.


SEE ALSO

perlfunc, the B::Hooks::OP::Check manpage.


AUTHOR

Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>


COPYRIGHT AND LICENSE

This software is copyright (c) 2011 - 2016 by Dagfinn Ilmari Mannsåker.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024