Lchown - use the lchown(2) system call from Perl
use Lchown; lchown $uid, $gid, 'foo' or die "lchown: $!"; my $count = lchown $uid, $gid, @filenames; # or use Lchown qw(lchown LCHOWN_AVAILABLE); warn "this system lacks the lchown system call\n" unless LCHOWN_AVAILABLE; ... # or use Lchown (); warn "this won't work\n" unless Lchown::LCHOWN_AVAILABLE; Lchown::lchown $uid, $gid, 'foo' or die "lchown: $!";
Provides a perl interface to the lchown() system call, on platforms that support it.
lchown()
The following symbols are exported be default:
Like the chown builtin, but using the lchown() system call so that symlinks will not be followed. Returns the number of files successfully changed.
chown
On systems without the lchown() system call, lchown always returns undef and sets errno to ENOSYS (Function not implemented).
lchown
undef
errno
ENOSYS
The following symbols are available for export but are not exported by default:
Returns true on platforms with the lchown() system call, and false on platforms without.
"chown" in perlfunc, lchown(2)
Nick Cleaton <nick@cleaton.net>
Copyright 2003-2009 Nick Cleaton, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Lchown, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lchown
CPAN shell
perl -MCPAN -e shell install Lchown
For more information on module installation, please visit the detailed CPAN module installation guide.