1Lchown(3)             User Contributed Perl Documentation            Lchown(3)
2
3
4

NAME

6       Lchown - use the lchown(2) system call from Perl
7

SYNOPSIS

9         use Lchown;
10
11         lchown $uid, $gid, 'foo' or die "lchown: $!";
12
13         my $count = lchown $uid, $gid, @filenames;
14
15         # or
16
17         use Lchown qw(lchown LCHOWN_AVAILABLE);
18
19         warn "this system lacks the lchown system call\n" unless LCHOWN_AVAILABLE;
20
21         ...
22
23         # or
24
25         use Lchown ();
26
27         warn "this won't work\n" unless Lchown::LCHOWN_AVAILABLE;
28         Lchown::lchown $uid, $gid, 'foo' or die "lchown: $!";
29

DESCRIPTION

31       Provides a perl interface to the "lchown()" system call, on platforms
32       that support it.
33

DEFAULT EXPORTS

35       The following symbols are exported be default:
36
37       lchown (LIST)
38           Like the "chown" builtin, but using the "lchown()" system call so
39           that symlinks will not be followed.  Returns the number of files
40           successfully changed.
41
42           On systems without the "lchown()" system call, "lchown" always
43           returns "undef" and sets "errno" to "ENOSYS" (Function not
44           implemented).
45

ADDITIONAL EXPORTS

47       The following symbols are available for export but are not exported by
48       default:
49
50       LCHOWN_AVAILABLE ()
51           Returns true on platforms with the "lchown()" system call, and
52           false on platforms without.
53

SEE ALSO

55       "chown" in perlfunc, lchown(2)
56

AUTHOR

58       Nick Cleaton <nick@cleaton.net>
59
61       Copyright 2003-2009 Nick Cleaton, all rights reserved.
62
63       This program is free software; you can redistribute it and/or modify it
64       under the same terms as Perl itself.
65
66
67
68perl v5.30.1                      2020-01-30                         Lchown(3)
Impressum