Sah-SchemaBundle-Unix

 view release on metacpan or  search on metacpan

lib/Sah/SchemaBundle/Unix.pm  view on Meta::CPAN

returns a record.

Support coercion from an existing group name.


=item * L<unix::groupname|Sah::Schema::unix::groupname>

Unix group name.

The checking follows POSIX rules: does not begin with a hyphen and only contains
[A-Za-z0-9._-].

The above rule allows integers like 1234, which can be confused with GID, so
this schema disallows pure integers.

The maximum length is 32 following libc6's limit.

Note that this schema does not check whether the group name exists (has record
in the user database e.g. C</etc/group>). To do that, use the
C<unix::groupname::exists> schema.


=item * L<unix::groupname::exists|Sah::Schema::unix::groupname::exists>

Unix group name that must exist on the system.

Support coercion from GID.


=item * L<unix::pathname|Sah::Schema::unix::pathname>

Path name (filename or dirname) on a Unix system.

This is just a convenient alias for pathname::unix.


=item * L<unix::pid|Sah::Schema::unix::pid>

Process identifier (PID).




=item * L<unix::signal|Sah::Schema::unix::signal>

Unix signal name (e.g. TERM or KILL) or number (9 or 15).

=item * L<unix::uid|Sah::Schema::unix::uid>

User identifier (UID).

Note that this schema does not check whether the UID exists (has record in the
user database e.g. C</etc/passwd>). To do that, use the C<unix::uid::exists>
schema.


=item * L<unix::uid::exists|Sah::Schema::unix::uid::exists>

User identifier (UID) that has to exist (has associated username) on the system.

Existing means having a user name associated with this UID, i.e. C<getpwuid>
returns a record.

Support coercion from an existing user name.


=item * L<unix::username|Sah::Schema::unix::username>

Unix account name.

The checking follows POSIX rules: does not begin with a hyphen and only contains
[A-Za-z0-9._-].

The above rule allows integers like 1234, which can be confused with UID, so
this schema disallows pure integers.

The maximum length is 32 following libc6's limit.

Note that this schema does not check whether the user name exists (has record in
the user database e.g. C</etc/group>). To do that, use the
C<unix::username::exists> schema.


=item * L<unix::username::exists|Sah::Schema::unix::username::exists>

Unix user name that must exist on the system.

Support coercion from UID.


=back

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/Sah-SchemaBundle-Unix>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-Sah-SchemaBundle-Unix>.

=head1 SEE ALSO

L<Sah> - schema specification

L<Data::Sah> - Perl implementation of Sah

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 CONTRIBUTING


To contribute, you can send patches by email/via RT, or send pull requests on
GitHub.

Most of the time, you don't need to build the distribution yourself. You can
simply modify the code, then test via:

 % prove -l



( run in 0.724 second using v1.01-cache-2.11-cpan-39bf76dae61 )