## 2019 06 01.01
+ - fixed issue RT#130344: false warning "operator in print statement"
+ for "use lib".
+
- fixed issue RT#130304: standard error output should include filename.
When perltidy error messages are directed to the standard error output with
-se or --standard-error-output, the message lines now have a prefix with
sub new {
my ( $class, $rOpts, $log_file, $warning_file, $fh_stderr, $saw_extrude,
- $filename_stamp )
+ $display_name )
= @_;
my $fh_warnings = $rOpts->{'standard-error-output'} ? $fh_stderr : undef;
_saw_brace_error => 0,
_saw_extrude => $saw_extrude,
_output_array => [],
- _filename_stamp => $filename_stamp ? $filename_stamp . ':' : "",
+ _filename_stamp => $display_name ? $display_name . ':' : "",
}, $class;
}
# could change the interpretation of the statement.
else {
if ( $tok =~ /^([x\/\+\-\*\%\&\.\?\<]|\>\>)$/ ) {
- complain("operator in print statement not recommended\n");
+
+ # Do not complain in 'use' statements, which have special syntax.
+ # For example, from RT#130344:
+ # use lib $FindBin::Bin . '/lib';
+ if ($statement_type ne 'use') {
+ complain("operator in print statement not recommended\n");
+ }
$op_expected = OPERATOR;
}
}