1Perl::Critic::Policy::IUPnseperurlt:OC:uoCtnrptiurttii:bc:u:Rt:eePqdouliPireceryCl:h:eDIconkcpeuudmtOeOpnuettnap(tu3it)o:n:RequireCheckedOpen(3)
2
3
4

NAME

6       Perl::Critic::Policy::InputOutput::RequireCheckedOpen
7

DESCRIPTION

9       The perl builtin I/O function "open" returns a false value on failure.
10       That value should always be checked to ensure that the open was suc‐
11       cessful.
12
13         my $error = open( $filehanle, $mode, $filname );                  # ok
14         open( $filehanle, $mode, $filname ) or die "unable to open: $!";  # ok
15         open( $filehanle, $mode, $filname );                              # not ok
16

AUTHOR

18       Andrew Moore <amoore@mooresystems.com>
19

ACKNOWLEDGMENTS

21       This policy module is based heavily on policies written by Jeffrey Ryan
22       Thalhammer <thaljef@cpan.org>.
23
25       Copyright (c) 2007 Andrew Moore.  All rights reserved.
26
27       This program is free software; you can redistribute it and/or modify it
28       under the same terms as Perl itself.  The full text of this license can
29       be found in the LICENSE file included with this module.
30
31
32
33perl v5.8.8           Perl::Critic2:0:0P7o-l0i3c-y2:0:InputOutput::RequireCheckedOpen(3)
Impressum