## name basic failures
## failures 12
## cut
open $fh, ">$output";
open($fh, ">$output");
open($fh, ">$output") or die;
open my $fh, ">$output";
open(my $fh, ">$output");
open(my $fh, ">$output") or die;
open FH, ">$output";
open(FH, ">$output");
open(FH, ">$output") or die;
#This are tricky because the Critic can't
#tell where the expression really ends
open FH, ">$output" or die;
open $fh, ">$output" or die;
open my $fh, ">$output" or die;
#-----------------------------------------------------------------------------
## name basic passes
## failures 0
## cut
open $fh, '>', $output;
open($fh, '>', $output);
open($fh, '>', $output) or die;
open my $fh, '>', $output;
open(my $fh, '>', $output);
open(my $fh, '>', $output) or die;
open FH, '>', $output;
open(FH, '>', $output);
open(FH, '>', $output) or die;
#This are tricky because the Critic can't
#tell where the expression really ends
open $fh, '>', $output or die;
open my $fh, '>', $output or die;
open FH, '>', $output or die;
$foo{open}; # not a function call
#-----------------------------------------------------------------------------
## name no three-arg equivalent passes
## failures 0
## cut
open( STDOUT, '>&STDOUT' );
open( STDIN, '>&STDIN' );
open( STDERR, '>&STDERR' );
open( \*STDOUT, '>&STDERR' );
open( *STDOUT, '>&STDERR' );
open( STDOUT, '>&STDERR' );
# These are actually forks
open FH, '-|';
open FH, '|-';
open FH, q{-|};
open FH, qq{-|};
open FH, "-|";
# Other file modes.
open( \*STDOUT, '>>&STDERR' );
open( \*STDOUT, '<&STDERR' );
open( \*STDOUT, '+>&STDERR' );
open( \*STDOUT, '+>>&STDERR' );
open( \*STDOUT, '+<&STDERR' );
#-----------------------------------------------------------------------------
## name pass with "use 5.005"
## failures 0
## cut
open $fh, ">$output";
use 5.005;
#-----------------------------------------------------------------------------
## name fail with "use 5.006"
## failures 1
## cut
open $fh, ">$output";
use 5.006;
#-----------------------------------------------------------------------------
##############################################################################
# $Date: 2009-01-17 12:27:26 -0600 (Sat, 17 Jan 2009) $
# $Author: clonezone $
# $Revision: 2988 $
##############################################################################
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 78
# indent-tabs-mode: nil
# c-indentation-style: bsd
# End:
# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :