App-Options

 view release on metacpan or  search on metacpan

bin/prefixadmin  view on Meta::CPAN

    return($fmt_mode);
}

#  1. $cnt = chmod 0755, 'foo', 'bar';
#  2. chmod 0755, @executables;
#  3. $mode = '0644'; chmod $mode, 'foo'; # !!! sets mode to
#  4. # --w----r-T
#  5. $mode = '0644'; chmod oct($mode), 'foo'; # this is better
#  6. $mode = 0644; chmod $mode, 'foo'; # this is best

#  1. $cnt = chown $uid, $gid, 'foo', 'bar';
#  2. chown $uid, $gid, @filenames;

sub _share_file {
    my ($self, $file, $options, $shgrp_gid, $mode, $uid, $gid) = @_;

    my $verbose = $options->{verbose};
    my $err_msg = "";
    my ($retval);
    if ($shgrp_gid) {

        if ($gid != $shgrp_gid) {
            $retval = chown($uid, $shgrp_gid, $file);
            if ($verbose) {
                print ">>> chown($uid, $shgrp_gid, $file) = [$retval]\n";
            }
        }

        my $share_mode = $mode & 07777;
        my $mode_needs_fix = 0;

        if ($mode & S_IFDIR) {
            if ($mode & S_ISGID) {
                # do nothing
            }



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