]> git.pld-linux.org Git - packages/perl-Path-Dispatcher.git/blob - perl-Path-Dispatcher.spec
- initial
[packages/perl-Path-Dispatcher.git] / perl-Path-Dispatcher.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define         pdir    Path
6 %define         pnam    Dispatcher
7 Summary:        Path::Dispatcher - Flexible and extensible dispatch
8 Name:           perl-Path-Dispatcher
9 Version:        1.08
10 Release:        1
11 License:        GPL v1+ or Artistic
12 Group:          Development/Languages/Perl
13 Source0:        http://www.cpan.org/modules/by-authors/id/E/ET/ETHER/Path-Dispatcher-%{version}.tar.gz
14 # Source0-md5:  936f5c08da60f2555d7ed304281e724b
15 URL:            https://metacpan.org/release/Path-Dispatcher
16 BuildRequires:  perl-Module-Build
17 BuildRequires:  perl-devel >= 1:5.8.0
18 BuildRequires:  rpm-perlprov >= 4.1-13
19 BuildRequires:  rpmbuild(macros) >= 1.745
20 %if %{with tests}
21 BuildRequires:  perl-Moo
22 BuildRequires:  perl-MooX-TypeTiny
23 BuildRequires:  perl-Test-Fatal
24 BuildRequires:  perl-Try-Tiny
25 BuildRequires:  perl-Type-Tiny
26 %endif
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 We really like Jifty::Dispatcher and wanted to use it for Prophet's
32 command line.
33
34 The basic operation is that of dispatch. Dispatch takes a path and a
35 list of rules, and it returns a list of matches. From there you can
36 "run" the rules that matched. These phases are distinct so that, if
37 you need to, you can inspect which rules were matched without ever
38 running their codeblocks.
39
40 Tab completion support is also available (see in particular
41 Path::Dispatcher::Cookbook/How can I configure tab completion for
42 shells?) for the dispatchers you write.
43
44 Each rule may take a variety of different forms (which I think
45 justifies the "flexible" adjective in the module's description). Some
46 of the rule types are:
47
48 Since Path::Dispatcher is designed with good object-oriented
49 programming practices, you can also write your own domain-specific
50 rule classes (which earns it the "extensible" adjective). For example,
51 in Prophet, we have a custom rule for matching, and tab completing,
52 record IDs.
53
54 %prep
55 %setup -q -n %{pdir}-%{pnam}-%{version}
56
57 %build
58 %{__perl} Makefile.PL \
59         INSTALLDIRS=vendor
60
61 %{__make}
62
63 %{?with_tests:%{__make} test}
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67
68 %{__make} install \
69         DESTDIR=$RPM_BUILD_ROOT
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %files
75 %defattr(644,root,root,755)
76 %doc Changes INSTALL README
77 %{perl_vendorlib}/Path/*.pm
78 %{perl_vendorlib}/Path/Dispatcher
79 %{_mandir}/man3/*
This page took 0.13052 seconds and 4 git commands to generate.