From d5721c97e419a66eb174f90b91ab1431b58ee075 Mon Sep 17 00:00:00 2001 From: Gabor Szabo Date: Tue, 29 Nov 2011 16:02:26 +0200 Subject: [PATCH] remove unused read_file --- t/test.pm | 54 +----------------------------------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/t/test.pm b/t/test.pm index 482ae76..fb2e334 100644 --- a/t/test.pm +++ b/t/test.pm @@ -100,13 +100,11 @@ The following symbols are exported upon request: =item find_exec -=item read_file - =back =cut -@EXPORT_OK = qw( check_req compare evcheck find_exec only_files read_file +@EXPORT_OK = qw( check_req compare evcheck only_files save_output restore_output tempdir tmpnam ); # Utility ----------------------------- @@ -1061,56 +1059,6 @@ nothing, if no such file exists. # defined further up to use in constants -# ------------------------------------- - -=head2 read_file - -=over 4 - -=item ARGUMENTS - -=over 4 - -=item filename - -B - -=item line-terminator - -B. Value of C<$/>. Defaults to C<"\n">. - -=back - -=item RETURNS - -=over 4 - -=item lines - -A list of lines in the file (lines determined by the value of -line-terminator), as an arrayref. - -=back - -=back - -=cut - -sub read_file { - my ($fn, $term) = @_; - - $term = "\n" - unless defined $term; - - my $fh = do { local *F; *F }; - sysopen $fh, $fn, O_RDONLY; - local $/ = $term; - my @lines = <$fh>; - close $fh; - - return \@lines; -} - # ---------------------------------------------------------------------------- =head1 EXAMPLES -- 2.39.2