]> git.pld-linux.org Git - SPECS.git/blob - perl-HTTP-Async.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / perl-HTTP-Async.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define pdir    HTTP
6 %define pnam    Async
7 Summary:        HTTP::Async - process multiple HTTP requests in parallel without blocking
8 Summary(pl.UTF-8):      HTTP::Async - równoległa obsługa wielu żądań HTTP bez blokowania
9 Name:           perl-HTTP-Async
10 Version:        0.09
11 Release:        1
12 # same as perl
13 License:        GPL v1+ or Artistic
14 Group:          Development/Languages/Perl
15 Source0:        http://www.cpan.org/modules/by-authors/id/E/EV/EVDB/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5:  231a496fba4502c5e1ecb1965b067a0f
17 URL:            http://search.cpan.org/dist/HTTP-Async/
18 BuildRequires:  perl-Module-Build
19 BuildRequires:  perl-devel >= 1:5.8.0
20 BuildRequires:  rpm-perlprov >= 4.1-13
21 %if %{with tests}
22 BuildRequires:  perl(HTTP::Request)
23 BuildRequires:  perl(HTTP::Response)
24 BuildRequires:  perl(HTTP::Server::Simple::CGI)
25 BuildRequires:  perl(HTTP::Status)
26 BuildRequires:  perl(LWP::UserAgent)
27 BuildRequires:  perl(Net::HTTP)
28 BuildRequires:  perl(Net::HTTP::NB)
29 BuildRequires:  perl(URI::Escape)
30 BuildRequires:  perl-Test-HTTP-Server-Simple
31 BuildRequires:  perl-URI
32 BuildRequires:  perl-libwww
33 %endif
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 Although using the conventional LWP::UserAgent is fast and easy it
39 does have some drawbacks - the code execution blocks until the request
40 has been completed and it is only possible to process one request at a
41 time. HTTP::Async attempts to address these limitations.
42
43 It gives you a 'Async' object that you can add requests to, and then
44 get the requests off as they finish. The actual sending and receiving
45 of the requests is abstracted. As soon as you add a request it is
46 transmitted, if there are too many requests in progress at the moment
47 they are queued. There is no concept of starting or stopping - it runs
48 continuously.
49
50 Whilst it is waiting to receive data it returns control to the code
51 that called it meaning that you can carry out processing whilst
52 fetching data from the network. All without forking or threading - it
53 is actually done using select lists.
54
55 %description -l pl.UTF-8
56 Pomimo, że konwencjonalny moduł LWP::UserAgent jest szybki i łatwy
57 w użyciu, ma kilka wad - wykonywanie kodu blokuje inne operacje do
58 czasu zakończenia żądania HTTP i możliwa jest obsługa tylko
59 jednego w tym samym czasie. HTTP::Async stara się rozwiązać ten
60 problem.
61
62 Moduł udostępnia obiekt 'Async', do którego można dodawać
63 żądania HTTP i pobierać je z niego gdy te zostaną zakończone.
64 Wysyłanie i odbieranie żądań jest ukryte pod warstwą abstrakcji.
65 Po dodaniu żądania jest ono natychmiastowo wysyłane, a jeśli jest
66 ich zbyt dużo w danym momencie, kolejne wywołania są kolejkowane.
67
68 Podczas oczekiwania na odbiór danych kontrola przekazywana jest do
69 wywołującego kodu, umożliwiając dalsze przetwarzanie podczas
70 pobierania odpowiedzi z sieci. Wszystkie operacje przeprowadzane są
71 za pomocą list select(), bez użycia podprocesów i wątków.
72
73 %prep
74 %setup -q -n %{pdir}-%{pnam}-%{version}
75
76 %build
77 %{__perl} Makefile.PL \
78         destdir=$RPM_BUILD_ROOT \
79         installdirs=vendor
80 %{__make}
81
82 %{?with_tests:%{__make} test}
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %{__make} install
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %files
93 %defattr(644,root,root,755)
94 %doc CHANGES README TODO
95 %{perl_vendorlib}/HTTP/*.pm
96 %{perl_vendorlib}/HTTP/Async
97 %{_mandir}/man3/*
This page took 0.273266 seconds and 3 git commands to generate.