Conjury-Core

 view release on metacpan or  search on metacpan

lib/Conjury/Core.pm  view on Meta::CPAN

list, they need not be listed here.  They will be fetched and automatically
appended to the factors list.

Use the optional 'Journal' argument to specify a journal object for the spell.

Use the optional 'Permission' argument to specify that the C<chmod> builtin
should be used to set the access permissions associated with the files after
they have been copied to the destination.  The syntax requirements for 
C<chmod> apply.

Use the optional 'Owner' argument to specify that the C<chown> builtin should
be used to set the user and group ownership after the files have been copied to
the destination.  The syntax requirements for C<chown> apply.

=cut

sub filecopy {
	my %arg = @_;
	my $error = $prototype{_filecopy_f()}->validate(\%arg);
	croak _filecopy_f, "-- $error" if $error;

	my $journal = $arg{Journal};
	my $directory = $arg{Directory};

lib/Conjury/Core.pm  view on Meta::CPAN

			my ($name, $pass);
			
			unless ($user =~ /\A\d+\Z/) {
				($name, $pass, $user) = getpwnam($user);
			}

			unless ($group =~ /\A\d+\Z/) {
				($name, $pass, $group) = getgrnam($group);
			}

			print "chown $owner->[0] $owner->[1] $product_str\n";

			if (!$preview) {
				chown($user, $group, @product) == @product
				  || do {
					  my $result = $!;
					  unlink @product;
					  return $result;
				  };
			}
		}

		return $result;
	};



( run in 1.966 second using v1.01-cache-2.11-cpan-71847e10f99 )