<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Mo::utils::Language - Mo language utilities.

SYNOPSIS
     use Mo::utils::Language qw(check_language);

     check_language($self, $key);

DESCRIPTION
    Mo language utilities for checking of data objects.

SUBROUTINES
  "check_language"
     check_language($self, $key);

    Check parameter defined by $key if it's ISO 639-1 language code and if
    language exists. Value could be undefined.

    Returns undef.

ERRORS
     check_language():
             Language code '%s' isn't ISO 639-1 code.

EXAMPLE1
     use strict;
     use warnings;

     use Mo::utils::Language qw(check_language);

     my $self = {
             'key' =&gt; 'en',
     };
     check_language($self, 'en');

     # Print out.
     print "ok\n";

     # Output:
     # ok

EXAMPLE2
     use strict;
     use warnings;

     use Error::Pure;
     use Mo::utils::Language qw(check_language);

     $Error::Pure::TYPE = 'Error';

     my $self = {
             'key' =&gt; 'xx',
     };
     check_language($self, 'key');

     # Print out.
     print "ok\n";

     # Output like:
     # #Error [...utils.pm:?] Language code 'xx' isn't ISO 639-1 code.

DEPENDENCIES
    Error::Pure, Exporter, List::Util, Locale::Language, Readonly.

SEE ALSO
    Mo  Micro Objects. Mo is less.

    Mo::utils
        Mo utilities.

    Wikibase::Datatype::Utils
        Wikibase datatype utilities.

REPOSITORY
    &lt;https://github.com/michal-josef-spacek/Mo-utils-Language&gt;

AUTHOR
    Michal Josef Ĺ&nbsp;paÄŤek &lt;mailto:skim@cpan.org&gt;

    &lt;http://skim.cz&gt;

LICENSE AND COPYRIGHT
    Â© 2022-2024 Michal Josef Ĺ&nbsp;paÄŤek

    BSD 2-Clause License

VERSION
    0.03

</pre></body></html>