NAME

App::errnos - List possible $! ($OS_ERROR, $ERRNO) values on your system

VERSION

This document describes version 0.02 of App::errnos (from Perl distribution App-errnos), released on 2015-09-10.

SEE ALSO

perldata

FUNCTIONS

list_errnos(%args) -> [status, msg, result, meta]

List possible $! ($OS_ERROR, $ERRNO) values on your system.

Examples:

list_errnos( detail => 1);

List possible errno numbers with their messages.

list_errnos( detail => 1, query => "'No such'");

Search specific errnos.

Arguments ('*' denotes required arguments):

  • detail => bool (default: 0)

    Return array of full records instead of just ID fields.

    By default, only the key (ID) field is returned per result entry.

  • fields => array[str]

    Select fields to return.

  • number => int

    Only return records where the 'number' field equals specified value.

  • number.in => array[int]

    Only return records where the 'number' field is in the specified values.

  • number.is => int

    Only return records where the 'number' field equals specified value.

  • number.isnt => int

    Only return records where the 'number' field does not equal specified value.

  • number.max => int

    Only return records where the 'number' field is less than or equal to specified value.

  • number.min => int

    Only return records where the 'number' field is greater than or equal to specified value.

  • number.not_in => array[int]

    Only return records where the 'number' field is not in the specified values.

  • number.xmax => int

    Only return records where the 'number' field is less than specified value.

  • number.xmin => int

    Only return records where the 'number' field is greater than specified value.

  • query => str

    Search.

  • sort => str

    Order records according to certain field(s).

    A list of field names separated by comma. Each field can be prefixed with '-' to specify descending order instead of the default ascending.

  • string => str

    Only return records where the 'string' field equals specified value.

  • string.contains => str

    Only return records where the 'string' field contains specified text.

  • string.in => array[str]

    Only return records where the 'string' field is in the specified values.

  • string.is => str

    Only return records where the 'string' field equals specified value.

  • string.isnt => str

    Only return records where the 'string' field does not equal specified value.

  • string.max => str

    Only return records where the 'string' field is less than or equal to specified value.

  • string.min => str

    Only return records where the 'string' field is greater than or equal to specified value.

  • string.not_contains => str

    Only return records where the 'string' field does not contain specified text.

  • string.not_in => array[str]

    Only return records where the 'string' field is not in the specified values.

  • string.xmax => str

    Only return records where the 'string' field is less than specified value.

  • string.xmin => str

    Only return records where the 'string' field is greater than specified value.

  • with_field_names => bool

    Return field names in each record (as hash/associative array).

    When enabled, function will return each record as hash/associative array (field name => value pairs). Otherwise, function will return each record as list/array (field value, field value, ...).

Returns an enveloped result (an array).

First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (result) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.

Return value: (any)

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/App-errnos.

SOURCE

Source repository is at https://github.com/perlancar/perl-App-errnos.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-errnos

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.