]> git.donarmstrong.com Git - perltidy.git/commitdiff
remove unused code
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 26 Jul 2022 16:25:55 +0000 (09:25 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 26 Jul 2022 16:25:55 +0000 (09:25 -0700)
lib/Perl/Tidy.pm
lib/Perl/Tidy/FileWriter.pm
lib/Perl/Tidy/Formatter.pm

index 7edecff1d603aed41831f14e7cd644786f8ed3f2..b2ced569b673ef509959d543b809d322b3d52d3b 100644 (file)
@@ -2902,46 +2902,6 @@ EOM
     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
index fdab83156a42176eb72377ce27a72fbbe88bb580..f25c43a3a483b6ed45ca7c720451f761c8da8741 100644 (file)
@@ -182,11 +182,6 @@ sub get_convergence_check {
     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_];
 }
index d70c7e923e3f273042207e8e2a6428f62fdfb5fe..b1f30e814ce9913cb8c279d7c7cc24b89ee36f04 100644 (file)
@@ -1170,11 +1170,6 @@ sub get_convergence_check {
     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_];
@@ -14295,14 +14290,6 @@ sub compare_indentation_levels {
         @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.