App-Transpierce

 view release on metacpan or  search on metacpan

bin/transpierce  view on Meta::CPAN

sub read_config
{
	open my $fh, '<:encoding(UTF-8)', $config_filename
		or die "could not open $config_filename for reading: $!";

	if (!-d $working_directory) {
		mkdir $working_directory
			or die "$working_directory did not exist, and couldn't be created: $!";
	}

	my $file_string = qr{ (["']) (?<str> .*) \g1 | (?<str> \S+) }x;
	my $perm_string = qr{ (?<chmod> 0[0-7]{3}) \s (?<chown> \S+) \s (?<chgrp> \S+) }x;

	my $context = undef;
	my @files;

	while (my $line = readline $fh) {
		if ($line =~ m{\A target \s+ $file_string}x) {
			$context = $+{str};
		}
		elsif ($line =~ m{\A \s* (?: (new) \s+ $perm_string \s+ $file_string | $file_string ) \s* \z}x) {

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.394 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )