3 %bcond_without tests # do not perform "make test"
6 %define pnam ConfigFromFile
7 %include /usr/lib/rpm/macros.perl
8 Summary: MooseX::ConfigFromFile - An abstract Moose role for setting attributes from a configfile
9 Summary(pl.UTF-8): MooseX::ConfigFromFile - Abstrakcyjna rola Moose do ustawiania atrybutów z pliku konfiguracyjnego
10 Name: perl-MooseX-ConfigFromFile
14 License: GPL v1+ or Artistic
15 Group: Development/Languages/Perl
16 Source0: http://www.cpan.org/modules/by-module/MooseX/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5: d473a4379f05f8ea8f7aeac1b1662d2a
18 URL: http://search.cpan.org/dist/MooseX-ConfigFromFile/
19 BuildRequires: perl-devel >= 1:5.8.0
20 BuildRequires: rpm-perlprov >= 4.1-13
22 BuildRequires: perl(MooseX::Types::Path::Class) >= 0.04
23 BuildRequires: perl-Moose >= 0.35
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 This is an abstract role which provides an alternate constructor for
30 creating objects using parameters passed in from a configuration file.
31 The actual implementation of reading the configuration file is left to
34 It declares an attribute configfile and a class method
35 new_with_config, and requires that concrete roles derived from it
36 implement the class method get_config_from_file.
38 Attributes specified directly as arguments to new_with_config
39 supercede those in the configfile.
41 MooseX::Getopt knows about this abstract role, and will use it if
42 available to load attributes from the file specified by the
43 commandline flag --configfile during its normal new_with_options.
45 %description -l pl.UTF-8
46 MooseX::ConfigFromFile - Abstrakcyjna rola Moose do ustawiania
47 atrybutów z pliku konfiguracyjnego
50 %setup -q -n %{pdir}-%{pnam}-%{version}
53 %{__perl} Makefile.PL \
57 %{?with_tests:%{__make} test}
60 rm -rf $RPM_BUILD_ROOT
63 DESTDIR=$RPM_BUILD_ROOT
66 rm -rf $RPM_BUILD_ROOT
69 %defattr(644,root,root,755)
71 %{perl_vendorlib}/MooseX/*.pm