perl-Params-ValidationCompiler-vl.spec 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. # Run optional test
  2. %bcond_with perl_Params_ValidationCompiler_enables_optional_test
  3. Name: perl-Params-ValidationCompiler
  4. Version: 0.30
  5. Release: 3%{?_dist_release}
  6. Summary: Build an optimized subroutine parameter validator once, use it forever
  7. License: Artistic 2.0
  8. URL: https://metacpan.org/release/Params-ValidationCompiler
  9. Source0: https://cpan.metacpan.org/modules/by-module/Params/Params-ValidationCompiler-%{version}.tar.gz
  10. Vendor: Project Vine
  11. Distribution: Vine Linux
  12. BuildArch: noarch
  13. # Build
  14. BuildRequires: coreutils
  15. BuildRequires: make
  16. BuildRequires: perl >= 2:5.26.2
  17. BuildRequires: perl(ExtUtils::MakeMaker)
  18. # Module
  19. BuildRequires: perl(B)
  20. BuildRequires: perl(Carp)
  21. #BuildRequires: perl(Class::XSAccessor)
  22. BuildRequires: perl(Eval::Closure)
  23. BuildRequires: perl(Exception::Class)
  24. BuildRequires: perl(Exporter)
  25. BuildRequires: perl(List::Util)
  26. BuildRequires: perl(overload)
  27. BuildRequires: perl(Scalar::Util)
  28. BuildRequires: perl(strict)
  29. BuildRequires: perl(warnings)
  30. # Optional Functionality
  31. BuildRequires: perl(Sub::Util)
  32. # Test Suite
  33. BuildRequires: perl(File::Spec)
  34. BuildRequires: perl(Specio)
  35. BuildRequires: perl(Specio::Declare)
  36. BuildRequires: perl(Specio::Library::Builtins)
  37. BuildRequires: perl(Test2::Plugin::NoWarnings)
  38. BuildRequires: perl(Test2::Require::Module)
  39. BuildRequires: perl(Test2::V0)
  40. BuildRequires: perl(Test::More)
  41. BuildRequires: perl(Test::Without::Module)
  42. %if %{with perl_Params_ValidationCompiler_enables_optional_test}
  43. # Optional Tests
  44. BuildRequires: perl(Const::Fast)
  45. BuildRequires: perl(CPAN::Meta)
  46. BuildRequires: perl(CPAN::Meta::Prereqs)
  47. BuildRequires: perl(Hash::Util)
  48. %if !%{defined perl_bootstrap}
  49. # Avoid build dependency cycles via Moose and DateTime
  50. BuildRequires: perl(Moose::Util::TypeConstraints)
  51. BuildRequires: perl(Types::Standard)
  52. %endif
  53. %endif
  54. # Dependencies
  55. Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
  56. Recommends: perl(Class::XSAccessor)
  57. Recommends: perl(Sub::Util)
  58. %description
  59. Create a customized, optimized, non-lobotomized, uncompromised, and thoroughly
  60. specialized parameter checking subroutine.
  61. %prep
  62. %setup -q -n Params-ValidationCompiler-%{version}
  63. %build
  64. perl Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1
  65. make %{?_smp_mflags}
  66. %install
  67. make install DESTDIR=%{buildroot}
  68. %{_fixperms} -c %{buildroot}
  69. %check
  70. make test
  71. %files
  72. %license LICENSE
  73. %doc Changes CODE_OF_CONDUCT.md CONTRIBUTING.md eg/ README.md
  74. %{perl_vendorlib}/Params/
  75. %{_mandir}/man3/Params::ValidationCompiler.3*
  76. %{_mandir}/man3/Params::ValidationCompiler::Compiler.3*
  77. %{_mandir}/man3/Params::ValidationCompiler::Exceptions.3*
  78. %changelog
  79. * Sun May 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.30-3
  80. - initial build for Vine Linux.
  81. * Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.30-2
  82. - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
  83. * Wed Aug 1 2018 Paul Howarth <paul@city-fan.org> - 0.30-1
  84. - Update to 0.30
  85. - Added a new option for named params, "return_object", which causes the
  86. validation sub to return an object with methods for each param rather than
  87. a hashref; this is a great way to avoid typos in hash keys (idea
  88. shamelessly stolen from Toby Inkster's Type::Params module)
  89. - Tweaked the POD formatting so that the table of contents generated by
  90. MetaCPAN is more useful
  91. - Optionally use Class::XSAccessor
  92. * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.27-4
  93. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  94. * Sun Jul 01 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.27-3
  95. - Perl 5.28 re-rebuild of bootstrapped packages
  96. * Fri Jun 29 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.27-2
  97. - Perl 5.28 rebuild
  98. * Mon Feb 12 2018 Paul Howarth <paul@city-fan.org> - 0.27-1
  99. - Update to 0.27
  100. - Fixed a bug with inlining Moose types: if a type's parent needed
  101. environment variables, those would not get closed over (GH#22)
  102. - Added a debug option to dump the source of the subroutine before it is
  103. eval'd
  104. * Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.26-2
  105. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  106. * Tue Nov 28 2017 Paul Howarth <paul@city-fan.org> - 0.26-1
  107. - Update to 0.26
  108. - The exceptions.t test would fail if Sub::Util was not installed (GH#19)
  109. - Fix test failures on Windows (GH#20)
  110. * Fri Nov 24 2017 Paul Howarth <paul@city-fan.org> - 0.25-1
  111. - Update to 0.25
  112. - All exceptions now include a stack trace by default when treated as a
  113. string; this makes finding where validation failed a lot easier (GH#18)
  114. - The name for a subroutine is now used in some exception messages, even if
  115. Sub::Util cannot be installed
  116. * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.24-4
  117. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  118. * Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.24-3
  119. - Perl 5.26 re-rebuild of bootstrapped packages
  120. * Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.24-2
  121. - Perl 5.26 rebuild
  122. * Sun Apr 9 2017 Paul Howarth <paul@city-fan.org> - 0.24-1
  123. - Update to 0.24
  124. - The source_for() exported by Params::ValidationCompiler did not work at all
  125. (GH#16)
  126. * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.23-2
  127. - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
  128. * Mon Jan 23 2017 Paul Howarth <paul@city-fan.org> - 0.23-1
  129. - Update to 0.23
  130. - Trying to create a validator for positional parameters where a required
  131. param came after one with a default did not throw an exception
  132. - A positional params validator with a slurpy type that had coercions did not
  133. return the coerced values; it returned the original values instead
  134. * Sat Dec 31 2016 Paul Howarth <paul@city-fan.org> - 0.22-1
  135. - Update to 0.22
  136. - Explicitly load the B module; previously, the code relied on this already
  137. being loaded by something else (GH#11)
  138. - Removed the alpha warning from the docs
  139. * Wed Dec 7 2016 Paul Howarth <paul@city-fan.org> - 0.21-1
  140. - Update to 0.21
  141. - Switched to using GitHub issues
  142. * Tue Dec 6 2016 Paul Howarth <paul@city-fan.org> - 0.20-1
  143. - Update to 0.20
  144. - The keys for parameter specifications are now validated, and if an unknown
  145. key is seen then an exception will be thrown; this will help you catch
  146. typos in your parameter specification (GH#8)
  147. * Tue Nov 22 2016 Paul Howarth <paul@city-fan.org> - 0.19-1
  148. - Update to 0.19
  149. - Non-inlinable Specio types caused a syntax error when used with positional
  150. params
  151. - Positional params with coercions and defaults did not work properly; the
  152. coerced value and the default would simply not be returned in any case
  153. * Mon Nov 14 2016 Paul Howarth <paul@city-fan.org> - 0.18-1
  154. - Update to 0.18
  155. - Using coercions with positional parameters could cause a "Modification of a
  156. read-only value attempted" exception when the generated code tried to
  157. assign to elements of @_; this is now fixed by making a copy if any of the
  158. types have a coercion
  159. - Using Moose types with coercions in a positional params check would cause
  160. invalid code to be generated; this could also happen with Type::Tiny if
  161. either the type or a coercion could not be inlined
  162. * Mon Nov 7 2016 Paul Howarth <paul@city-fan.org> - 0.17-1
  163. - Update to 0.17
  164. - When using positional parameters, parameters with a default are now
  165. optional; for named parameters, this was already the case
  166. * Fri Nov 4 2016 Paul Howarth <paul@city-fan.org> - 0.16-1
  167. - Update to 0.16
  168. - Previously, using a default with a positional parameter would result in an
  169. error when compiling the validator subroutine; defaults now work with
  170. positional parameters (GH#5)
  171. - Moose and Specio types (and coercions) that provide variables to close over
  172. when being inlined did not always compile properly; most notably, this was
  173. not being handled at all for Moose types, and not completely handled for
  174. Specio coercions
  175. * Thu Nov 3 2016 Paul Howarth <paul@city-fan.org> - 0.14-1
  176. - Update to 0.14
  177. - Added a "named_to_list" option to support returning only the parameter
  178. values from a named parameter validator rather than the key-value pairs
  179. (GH#4)
  180. - Errors from calls to validation_for() now use croak so as to show up at the
  181. call site, rather than in the internals
  182. * Wed Oct 26 2016 Petr Pisar <ppisar@redhat.com> - 0.13-4
  183. - Break build cycle: perl-Moose → perl-DateTime → perl-Params-ValidationCompiler
  184. * Mon Sep 19 2016 Paul Howarth <paul@city-fan.org> - 0.13-3
  185. - Drop unused BR: findutils (#1377252)
  186. * Mon Sep 19 2016 Paul Howarth <paul@city-fan.org> - 0.13-2
  187. - Sanitize for Fedora submission
  188. * Sun Sep 18 2016 Paul Howarth <paul@city-fan.org> - 0.13-1
  189. - Initial RPM version