File perl-Net-LibAsyncNS.spec of Package perl-Net-LibAsyncNS

# spec file for package perl-Net-LibAsyncNS
# Copyright (c) 2020 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           perl-Net-LibAsyncNS
Version:        0.04
Release:        0
%define cpan_name Net-LibAsyncNS
Summary:        Perl wrapper around F<libasyncns>
License:        Artistic-1.0 OR GPL-1.0-or-later
Group:          Development/Libraries/Perl
URL:  {cpan_name}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(ExtUtils::CBuilder)
BuildRequires:  perl(ExtUtils::CChecker) >= 0.05
BuildRequires:  perl(ExtUtils::PkgConfig)
BuildRequires:  perl(Module::Build) >= 0.400400
BuildRequires:  perl(Module::Build::Using::PkgConfig)
BuildRequires:  perl(Test::Identity)
BuildRequires:  perl(Test::More) >= 0.88
BuildRequires:  perl(Test::Refcount)

The name resolver functions 'getaddrinfo' and 'getnameinfo' as provided by
most C libraries are blocking functions; they will perform their work and
return an answer when it is ready. This makes it hard to use these name
resolvers in asynchronous or non-blocking code.

The _libasyncns_ library provides a way to invoke these library functions
from within an asynchronous or non-blocking program. Individual resolver
queries are made by calling a function which returns an object representing
an outstanding query (a kind of future). A filehandle is provided by the
resolver to watch for readability; when it is readable, a function should
be called to collect completed queries. The example in the SYNOPSIS above
does not demonstrate this; see the EXAMPLES section below for one that

%setup -q -n %{cpan_name}-%{version}

perl Build.PL installdirs=vendor optimize="%{optflags}"
./Build build flags=%{?_smp_mflags}

./Build test

./Build install destdir=%{buildroot} create_packlist=0

%files -f %{name}.files
%doc Changes examples README
%license LICENSE

openSUSE Build Service is sponsored by