180123.2.15 · c2d28d7a0aef8132830d33aa1ec9a60869550b14
Move read_rcfile from ConfigFinder into ConfigLoader
reading declarations
Changes to lib/App/Ack/ConfigFinder.pm. All files
@@ -144,34 +144,4 @@ sub find_config_files { return _remove_redundancies( @config_files ); } --=head2 read_rcfile--Reads the contents of the .ackrc file and returns the arguments.--=cut--sub read_rcfile {- my $file = shift;-- return unless defined $file && -e $file;-- my @lines;-- open( my $fh, '<', $file ) or App::Ack::die( "Unable to read $file: $!" );- while ( my $line = <$fh> ) {- chomp $line;- $line =~ s/^\s+//;- $line =~ s/\s+$//;-- next if $line eq '';- next if $line =~ /^\s*#/;-- push( @lines, $line );- }- close $fh or App::Ack::die( "Unable to close $file: $!" );-- return @lines;-}- 1;