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