File-AtomicWrite

 view release on metacpan or  search on metacpan

t/010-write_file.t  view on Meta::CPAN

    }
}

# owner - confirm that the module code is not buggy, as cannot expect to
# have the rights to chown a file to a different account. Might be able
# to test the group code, as the group could vary, depending on whether
# BSD or Solaris directory group id semantics are in play, but detecting
# that would be annoying.
SKIP: {
    my ( $user_name, $user_uid, $group_name, $group_gid );
    # getpwuid unimplemented on a certain OS, try to skip.
    eval {
        $user_name  = getpwuid($<) || undef;
        $user_uid   = $<           || '';
        $group_name = getgrgid($() || undef;
        $group_gid  = $(           || '';
    };

    skip( "no suitable login data to test owner option", 5 )
      unless defined $user_name
      and $user_uid =~ m/^[0-9]+$/
      and defined $group_name
      and $group_gid =~ m/^[0-9]+$/;



( run in 0.267 second using v1.01-cache-2.11-cpan-8d75d55dd25 )