return $msg;
} ## end sub compare_string_buffers
-sub get_stream_as_named_file {
-
- # Return the name of a file containing a stream of data, creating
- # a temporary file if necessary.
- # Given:
- # $stream - the name of a file or stream
- # Returns:
- # $fname = name of file if possible, or undef
- # $if_tmpfile = true if temp file, undef if not temp file
- #
- # NOTE: This routine was previously needed for passing actual files to Perl
- # for a syntax check. It is not currently used.
- my ($stream) = @_;
- my $is_tmpfile;
- my $fname;
- if ($stream) {
- if ( ref($stream) ) {
- my ( $fh_stream, $fh_name ) =
- Perl::Tidy::streamhandle( $stream, 'r' );
- if ($fh_stream) {
- my ( $fout, $tmpnam ) = File::Temp::tempfile();
- if ($fout) {
- $fname = $tmpnam;
- $is_tmpfile = 1;
- binmode $fout;
- while ( my $line = $fh_stream->getline() ) {
- $fout->print($line);
- }
- $fout->close();
- }
- $fh_stream->close();
- }
- }
- elsif ( $stream ne '-' && -f $stream ) {
- $fname = $stream;
- }
- }
- return ( $fname, $is_tmpfile );
-} ## end sub get_stream_as_named_file
-
sub fileglob_to_re {
# modified (corrected) from version in find2perl
return $self->[_K_arrival_order_matches_] && !@{$rlist};
}
-sub get_K_sequence_error_msg {
- my ($self) = @_;
- return $self->[_K_sequence_error_msg_];
-}
-
sub get_output_line_number {
return $_[0]->[_output_line_number_];
}
return $self->[_converged_];
}
-sub get_added_semicolon_count {
- my $self = shift;
- return $self->[_added_semicolon_count_];
-}
-
sub get_output_line_number {
my ($self) = @_;
my $vao = $self->[_vertical_aligner_object_];
@break_before_or_after_token{@q} = (1) x scalar(@q);
}
- # This is no longer called - global vars - moved into initialize_batch_vars
- sub initialize_forced_breakpoint_vars {
- $forced_breakpoint_count = 0;
- $index_max_forced_break = UNDEFINED_INDEX;
- $forced_breakpoint_undo_count = 0;
- return;
- }
-
sub set_fake_breakpoint {
# Just bump up the breakpoint count as a signal that there are breaks.