commit 86c1077faa64212af1884ecabeb347b5bfa96f9e Author: Paul Howarth <paul@xxxxxxxxxxxx> Date: Thu Apr 24 14:06:07 2014 +0100 Initial import (perl-MouseX-ConfigFromFile-0.05-3) This is an abstract role that provides an alternate constructor for creating objects using parameters passed in from a configuration file. The actual implementation of reading the configuration file is left to concrete subroles. It declares an attribute configfile and a class method new_with_config, and requires that concrete roles derived from it implement the class method get_config_from_file. Attributes specified directly as arguments to new_with_config supercede those in the configfile. .gitignore | 1 + perl-MouseX-ConfigFromFile.spec | 86 +++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 88 insertions(+), 0 deletions(-) --- diff --git a/.gitignore b/.gitignore index e69de29..f2288c0 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/MouseX-ConfigFromFile-[0-9.]*.tar.gz diff --git a/perl-MouseX-ConfigFromFile.spec b/perl-MouseX-ConfigFromFile.spec new file mode 100644 index 0000000..546b19d --- /dev/null +++ b/perl-MouseX-ConfigFromFile.spec @@ -0,0 +1,86 @@ +Name: perl-MouseX-ConfigFromFile +Summary: An abstract Mouse role for setting attributes from a configfile +Version: 0.05 +Release: 3%{?dist} +License: GPL+ or Artistic +URL: http://search.cpan.org/dist/MouseX-ConfigFromFile/ +Source0: http://search.cpan.org/CPAN/authors/id/M/MA/MASAKI/MouseX-ConfigFromFile-%{version}.tar.gz +BuildArch: noarch +# Module Build +BuildRequires: perl +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.42 +BuildRequires: perl(inc::Module::Install) +BuildRequires: perl(Module::Install::AuthorTests) +BuildRequires: perl(Module::Install::ReadmeFromPod) +BuildRequires: perl(Module::Install::ReadmeMarkdownFromPod) +BuildRequires: perl(Module::Install::Repository) +# Module Runtime +BuildRequires: perl(Mouse) >= 0.39 +BuildRequires: perl(Mouse::Role) +BuildRequires: perl(MouseX::Types::Path::Class) >= 0.06 +# Test Suite +BuildRequires: perl(File::Spec) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.94 +BuildRequires: perl(Test::UseAllModules) +# Author Tests +BuildRequires: perl(Test::Pod) >= 1.00 +BuildRequires: perl(Test::Pod::Coverage) >= 1.04 +BuildRequires: perl(Test::Spelling), aspell-en +# Runtime +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(Mouse) >= 0.39 + +%description +This is an abstract role that provides an alternate constructor for creating +objects using parameters passed in from a configuration file. The actual +implementation of reading the configuration file is left to concrete subroles. + +It declares an attribute configfile and a class method new_with_config, and +requires that concrete roles derived from it implement the class method +get_config_from_file. + +Attributes specified directly as arguments to new_with_config supercede those +in the configfile. + +%prep +%setup -q -n MouseX-ConfigFromFile-%{version} + +# Unbundle Module::Install stuff and Test::UseAllModules +# to check for issues with current toolchain modules +rm -rf inc/ +perl -ni -e 'print unless /^inc\//;' MANIFEST + +# Avoid the need for Module::Install::AuthorRequires and +# all of upstream's toolchain modules as a result of the unbundling +perl -ni -e 'print unless /author_requires/;' Makefile.PL + +%build +perl Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=%{buildroot} +find %{buildroot} -type f -name .packlist -exec rm -f {} ';' +%{_fixperms} %{buildroot} + +%check +make test TEST_POD=1 + +%files +%doc Changes README +%{perl_vendorlib}/MouseX/ +%{_mandir}/man3/MouseX::ConfigFromFile.3* + +%changelog +* Wed Apr 23 2014 Paul Howarth <paul@xxxxxxxxxxxx> - 0.05-3 +- Incorporate feedback from package review (#1088946) + - Comment on module unbundling in %%prep + - Don't need to clean buildroot in %%install + +* Mon Apr 21 2014 Paul Howarth <paul@xxxxxxxxxxxx> - 0.05-2 +- Unbundle Module::Install stuff +- Add buildreqs for author tests + +* Thu Apr 17 2014 Paul Howarth <paul@xxxxxxxxxxxx> - 0.05-1 +- Initial RPM version diff --git a/sources b/sources index e69de29..7b1dd4a 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +f6dc7f738085611949510c07301402ca MouseX-ConfigFromFile-0.05.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel