[12120] | 1 | # Run optional test |
---|
| 2 | %bcond_with perl_Specio_enables_optional_test |
---|
| 3 | |
---|
| 4 | Name: perl-Specio |
---|
| 5 | Version: 0.43 |
---|
| 6 | Release: 3%{?_dist_release} |
---|
| 7 | Summary: Type constraints and coercions for Perl |
---|
| 8 | License: Artistic 2.0 |
---|
| 9 | URL: https://metacpan.org/release/Specio |
---|
| 10 | Source0: https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Specio-%{version}.tar.gz |
---|
| 11 | |
---|
| 12 | Vendor: Project Vine |
---|
| 13 | Distribution: Vine Linux |
---|
| 14 | |
---|
| 15 | BuildArch: noarch |
---|
| 16 | # Module Build |
---|
| 17 | BuildRequires: coreutils |
---|
| 18 | BuildRequires: make |
---|
| 19 | BuildRequires: perl >= 2:5.26.2 |
---|
| 20 | BuildRequires: perl(ExtUtils::MakeMaker) |
---|
| 21 | # Module Runtime |
---|
| 22 | BuildRequires: perl(B) |
---|
| 23 | BuildRequires: perl(Carp) |
---|
| 24 | BuildRequires: perl(Devel::StackTrace) |
---|
| 25 | BuildRequires: perl(Eval::Closure) |
---|
| 26 | BuildRequires: perl(Exporter) |
---|
| 27 | BuildRequires: perl(IO::File) |
---|
| 28 | BuildRequires: perl(List::Util) |
---|
| 29 | BuildRequires: perl(Module::Runtime) |
---|
| 30 | BuildRequires: perl(MRO::Compat) |
---|
| 31 | BuildRequires: perl(overload) |
---|
| 32 | BuildRequires: perl(parent) |
---|
| 33 | BuildRequires: perl(re) |
---|
| 34 | BuildRequires: perl(Ref::Util) >= 0.112 |
---|
| 35 | BuildRequires: perl(Role::Tiny) >= 1.003003 |
---|
| 36 | BuildRequires: perl(Role::Tiny::With) |
---|
| 37 | BuildRequires: perl(Scalar::Util) |
---|
| 38 | BuildRequires: perl(Storable) |
---|
| 39 | BuildRequires: perl(strict) |
---|
| 40 | BuildRequires: perl(Sub::Quote) |
---|
| 41 | BuildRequires: perl(Sub::Util) |
---|
| 42 | BuildRequires: perl(Test::Fatal) |
---|
| 43 | BuildRequires: perl(Test::More) |
---|
| 44 | BuildRequires: perl(Try::Tiny) |
---|
| 45 | BuildRequires: perl(version) |
---|
| 46 | BuildRequires: perl(warnings) |
---|
| 47 | # Test Suite |
---|
| 48 | BuildRequires: perl(File::Spec) |
---|
| 49 | BuildRequires: perl(lib) |
---|
| 50 | BuildRequires: perl(open) |
---|
| 51 | BuildRequires: perl(Test::Needs) |
---|
| 52 | BuildRequires: perl(utf8) |
---|
| 53 | %if %{with perl_Specio_enables_optional_test} |
---|
| 54 | # Optional Tests |
---|
| 55 | BuildRequires: perl(CPAN::Meta) |
---|
| 56 | BuildRequires: perl(CPAN::Meta::Prereqs) |
---|
| 57 | BuildRequires: perl(Moo) |
---|
| 58 | %if !%{defined perl_bootstrap} |
---|
| 59 | # Break cycle: perl-Moose → perl-DateTime → perl-Specio |
---|
| 60 | BuildRequires: perl(Moose) |
---|
| 61 | # Break cycle: perl-Mouse → perl-Moose → perl-DateTime → perl-Specio |
---|
| 62 | BuildRequires: perl(Mouse) |
---|
| 63 | %endif |
---|
| 64 | BuildRequires: perl(namespace::autoclean) |
---|
| 65 | %endif |
---|
| 66 | # Dependencies |
---|
| 67 | Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) |
---|
| 68 | Requires: perl(Ref::Util) >= 0.112 |
---|
| 69 | Requires: perl(Sub::Util) >= 1.40 |
---|
| 70 | |
---|
| 71 | # Avoid provides for private packages |
---|
| 72 | %global __provides_exclude ^perl\\(_T::.*\\) |
---|
| 73 | |
---|
| 74 | %description |
---|
| 75 | The Specio distribution provides classes for representing type constraints |
---|
| 76 | and coercion, along with syntax sugar for declaring them. |
---|
| 77 | |
---|
| 78 | Note that this is not a proper type system for Perl. Nothing in this |
---|
| 79 | distribution will magically make the Perl interpreter start checking a value's |
---|
| 80 | type on assignment to a variable. In fact, there's no built-in way to apply a |
---|
| 81 | type to a variable at all. |
---|
| 82 | |
---|
| 83 | Instead, you can explicitly check a value against a type, and optionally coerce |
---|
| 84 | values to that type. |
---|
| 85 | |
---|
| 86 | %package -n perl-Test-Specio |
---|
| 87 | Summary: Test helpers for Specio |
---|
| 88 | License: Artistic 2.0 |
---|
| 89 | Requires: %{name} = %{version}-%{release} |
---|
| 90 | |
---|
| 91 | %description -n perl-Test-Specio |
---|
| 92 | This package provides some helper functions and variables for testing Specio |
---|
| 93 | types. |
---|
| 94 | |
---|
| 95 | %prep |
---|
| 96 | %setup -q -n Specio-%{version} |
---|
| 97 | |
---|
| 98 | %build |
---|
| 99 | perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 |
---|
| 100 | make %{?_smp_mflags} |
---|
| 101 | |
---|
| 102 | %install |
---|
| 103 | make install DESTDIR=%{buildroot} |
---|
| 104 | %{_fixperms} -c %{buildroot} |
---|
| 105 | |
---|
| 106 | %check |
---|
| 107 | make test |
---|
| 108 | |
---|
| 109 | %files |
---|
| 110 | %license LICENSE |
---|
| 111 | %doc Changes CODE_OF_CONDUCT.md CONTRIBUTING.md README.md TODO.md |
---|
| 112 | %{perl_vendorlib}/Specio.pm |
---|
| 113 | %{perl_vendorlib}/Specio/ |
---|
| 114 | %{_mandir}/man3/Specio.3* |
---|
| 115 | %{_mandir}/man3/Specio::Coercion.3* |
---|
| 116 | %{_mandir}/man3/Specio::Constraint::AnyCan.3* |
---|
| 117 | %{_mandir}/man3/Specio::Constraint::AnyDoes.3* |
---|
| 118 | %{_mandir}/man3/Specio::Constraint::AnyIsa.3* |
---|
| 119 | %{_mandir}/man3/Specio::Constraint::Enum.3* |
---|
| 120 | %{_mandir}/man3/Specio::Constraint::Intersection.3* |
---|
| 121 | %{_mandir}/man3/Specio::Constraint::ObjectCan.3* |
---|
| 122 | %{_mandir}/man3/Specio::Constraint::ObjectDoes.3* |
---|
| 123 | %{_mandir}/man3/Specio::Constraint::ObjectIsa.3* |
---|
| 124 | %{_mandir}/man3/Specio::Constraint::Parameterizable.3* |
---|
| 125 | %{_mandir}/man3/Specio::Constraint::Parameterized.3* |
---|
| 126 | %{_mandir}/man3/Specio::Constraint::Role::CanType.3* |
---|
| 127 | %{_mandir}/man3/Specio::Constraint::Role::DoesType.3* |
---|
| 128 | %{_mandir}/man3/Specio::Constraint::Role::Interface.3* |
---|
| 129 | %{_mandir}/man3/Specio::Constraint::Role::IsaType.3* |
---|
| 130 | %{_mandir}/man3/Specio::Constraint::Simple.3* |
---|
| 131 | %{_mandir}/man3/Specio::Constraint::Structurable.3* |
---|
| 132 | %{_mandir}/man3/Specio::Constraint::Structured.3* |
---|
| 133 | %{_mandir}/man3/Specio::Constraint::Union.3* |
---|
| 134 | %{_mandir}/man3/Specio::Declare.3* |
---|
| 135 | %{_mandir}/man3/Specio::DeclaredAt.3* |
---|
| 136 | %{_mandir}/man3/Specio::Exception.3* |
---|
| 137 | %{_mandir}/man3/Specio::Exporter.3* |
---|
| 138 | %{_mandir}/man3/Specio::Helpers.3* |
---|
| 139 | %{_mandir}/man3/Specio::Library::Builtins.3* |
---|
| 140 | %{_mandir}/man3/Specio::Library::Numeric.3* |
---|
| 141 | %{_mandir}/man3/Specio::Library::Perl.3* |
---|
| 142 | %{_mandir}/man3/Specio::Library::String.3* |
---|
| 143 | %{_mandir}/man3/Specio::Library::Structured.3* |
---|
| 144 | %{_mandir}/man3/Specio::Library::Structured::Dict.3* |
---|
| 145 | %{_mandir}/man3/Specio::Library::Structured::Map.3* |
---|
| 146 | %{_mandir}/man3/Specio::Library::Structured::Tuple.3* |
---|
| 147 | %{_mandir}/man3/Specio::OO.3* |
---|
| 148 | %{_mandir}/man3/Specio::PartialDump.3* |
---|
| 149 | %{_mandir}/man3/Specio::Registry.3* |
---|
| 150 | %{_mandir}/man3/Specio::Role::Inlinable.3* |
---|
| 151 | %{_mandir}/man3/Specio::Subs.3* |
---|
| 152 | %{_mandir}/man3/Specio::TypeChecks.3* |
---|
| 153 | |
---|
| 154 | %files -n perl-Test-Specio |
---|
| 155 | %{perl_vendorlib}/Test/ |
---|
| 156 | %{_mandir}/man3/Test::Specio.3* |
---|
| 157 | |
---|
| 158 | %changelog |
---|
| 159 | * Sat May 18 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net>- 0.43-3 |
---|
| 160 | - initial build for Vine Linux. |
---|
| 161 | |
---|
| 162 | * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.43-2 |
---|
| 163 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |
---|
| 164 | |
---|
| 165 | * Sun Oct 28 2018 Paul Howarth <paul@city-fan.org> - 0.43-1 |
---|
| 166 | - Update to 0.43 |
---|
| 167 | - Optimized compile-time operations to make Specio itself quicker to load; |
---|
| 168 | Specio's load time is a non-trivial part of the load time of DateTime (and |
---|
| 169 | presumably other things that use it) |
---|
| 170 | - Based on https://github.com/houseabsolute/DateTime.pm/issues/85 |
---|
| 171 | - Package new CODE_OF_CONDUCT.md file |
---|
| 172 | |
---|
| 173 | * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.42-5 |
---|
| 174 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
---|
| 175 | |
---|
| 176 | * Sun Jul 01 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.42-4 |
---|
| 177 | - Perl 5.28 re-rebuild of bootstrapped packages |
---|
| 178 | |
---|
| 179 | * Fri Jun 29 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.42-3 |
---|
| 180 | - Perl 5.28 rebuild |
---|
| 181 | |
---|
| 182 | * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.42-2 |
---|
| 183 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
---|
| 184 | |
---|
| 185 | * Mon Nov 6 2017 Paul Howarth <paul@city-fan.org> - 0.42-1 |
---|
| 186 | - Update to 0.42 |
---|
| 187 | - Fixed checks for whether a class is loaded in light of upcoming |
---|
| 188 | optimization in Perl 5.28 (GH#12) |
---|
| 189 | - The Perl library claimed it provided types named LaxVersionStr and |
---|
| 190 | StrictVersionStr but they were really named LaxVersion and StrictVersion; |
---|
| 191 | the names have now been fixed to match the documentation, so they are |
---|
| 192 | LaxVersionStr and StrictVersionStr |
---|
| 193 | |
---|
| 194 | * Fri Aug 4 2017 Paul Howarth <paul@city-fan.org> - 0.40-1 |
---|
| 195 | - Update to 0.40 |
---|
| 196 | - Fixed more bugs with {any,object}_{can,does,isa}_type |
---|
| 197 | - When passed a glob (not a globref) they would die in their type check |
---|
| 198 | - On Perl 5.16 or earlier, passing a number to an any_* type would also die |
---|
| 199 | - Fixed subification overloading: if Sub::Quote was loaded, this would be |
---|
| 200 | used, but any environment variables needed for the closure would not be |
---|
| 201 | included, which broke enums, among other things |
---|
| 202 | |
---|
| 203 | * Thu Aug 3 2017 Paul Howarth <paul@city-fan.org> - 0.39-1 |
---|
| 204 | - Update to 0.39 |
---|
| 205 | - Many bug fixes and improvements to the types created by |
---|
| 206 | {any,object}_{can,does,isa}_type; in some cases, an invalid value could |
---|
| 207 | cause an exception in type check itself, and in other cases, a value that |
---|
| 208 | failed a type check would cause an exception when generating a message |
---|
| 209 | describing the failure |
---|
| 210 | - The messages describing a failure for all of these types have been improved |
---|
| 211 | - You can now create anonymous *_does and *_isa types using the exports from |
---|
| 212 | Specio::Declare |
---|
| 213 | |
---|
| 214 | * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.38-2 |
---|
| 215 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild |
---|
| 216 | |
---|
| 217 | * Sat Jul 1 2017 Paul Howarth <paul@city-fan.org> - 0.38-1 |
---|
| 218 | - Update to 0.38 |
---|
| 219 | - Simplify checks for overloading to not call overload::Overloaded(); just |
---|
| 220 | checking the return value of overload::Method() is sufficient |
---|
| 221 | |
---|
| 222 | * Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.37-3 |
---|
| 223 | - Perl 5.26 re-rebuild of bootstrapped packages |
---|
| 224 | |
---|
| 225 | * Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.37-2 |
---|
| 226 | - Perl 5.26 rebuild |
---|
| 227 | |
---|
| 228 | * Tue May 9 2017 Paul Howarth <paul@city-fan.org> - 0.37-1 |
---|
| 229 | - Update to 0.37 |
---|
| 230 | - Possible fix for very weird failures seen under threaded Perls with some |
---|
| 231 | modules that use Specio |
---|
| 232 | |
---|
| 233 | * Mon Feb 20 2017 Paul Howarth <paul@city-fan.org> - 0.36-1 |
---|
| 234 | - Update to 0.36 |
---|
| 235 | - Inlined coercions would attempt to coerce for every type that matched the |
---|
| 236 | value given, instead of stopping after the first type (GH#11) |
---|
| 237 | - Inlined coercions did not include the inline environment variables needed |
---|
| 238 | by the type from which the coercion was being performed (GH#8) |
---|
| 239 | - When you use the same type repeatedly as coderef (for example, as a |
---|
| 240 | constraint with Moo), it will only generate its subified form once, rather |
---|
| 241 | than regenerating it each time it is de-referenced |
---|
| 242 | - Added an API to Specio::Subs to allow you to combine type libraries and |
---|
| 243 | helper subs in one package for exporting; see the Specio::Exporter docs for |
---|
| 244 | more detail |
---|
| 245 | |
---|
| 246 | * Mon Feb 13 2017 Paul Howarth <paul@city-fan.org> - 0.35-1 |
---|
| 247 | - Update to 0.35 |
---|
| 248 | - Added Specio::Subs, a module that allows you to turn one or more library's |
---|
| 249 | types into subroutines like is_Int() and to_Int() |
---|
| 250 | - Added an inline_coercion method to Specio constraints |
---|
| 251 | |
---|
| 252 | * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-2 |
---|
| 253 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild |
---|
| 254 | |
---|
| 255 | * Mon Jan 30 2017 Paul Howarth <paul@city-fan.org> - 0.34-1 |
---|
| 256 | - Update to 0.34 |
---|
| 257 | - Packages with Specio::Exporter can now specify additional arbitrary subs to |
---|
| 258 | exporter; see the Specio::Exporter docs for details |
---|
| 259 | - Importing the same library twice in a given package would throw an |
---|
| 260 | exception; the second attempt to import is now ignored |
---|
| 261 | |
---|
| 262 | * Wed Jan 25 2017 Paul Howarth <paul@city-fan.org> - 0.33-1 |
---|
| 263 | - Update to 0.33 |
---|
| 264 | - Fixed a mistake in the SYNOPSIS for Specio::Declare; the example for the |
---|
| 265 | *_isa_type helpers was not correct |
---|
| 266 | - Removed the alpha warning from the docs; this is being used by enough of my |
---|
| 267 | modules on CPAN that I don't plan on doing any big breaking changes without |
---|
| 268 | a deprecation first |
---|
| 269 | |
---|
| 270 | * Fri Jan 13 2017 Paul Howarth <paul@city-fan.org> - 0.32-1 |
---|
| 271 | - Update to 0.32 |
---|
| 272 | - Fixed a bug in the inlining for types create by any_can_type() and |
---|
| 273 | object_can_type(); this inlining mostly worked by accident because of some |
---|
| 274 | List::Util XS magic, but this broke under the debugger (GH#6, |
---|
| 275 | https://github.com/houseabsolute/DateTime.pm/issues/49) |
---|
| 276 | |
---|
| 277 | * Mon Nov 7 2016 Paul Howarth <paul@city-fan.org> - 0.31-1 |
---|
| 278 | - Update to 0.31 |
---|
| 279 | - The stack trace contained by Specio::Exception objects no longer includes |
---|
| 280 | stack frames for the Specio::Exception package |
---|
| 281 | - Made the inline_environment() and description() methods public on type and |
---|
| 282 | coercion objects |
---|
| 283 | |
---|
| 284 | * Thu Oct 20 2016 Petr Pisar <ppisar@redhat.com> - 0.30-2 |
---|
| 285 | - Break build cycle: perl-Moose → perl-DateTime → perl-Specio |
---|
| 286 | |
---|
| 287 | * Sun Oct 16 2016 Paul Howarth <paul@city-fan.org> - 0.30-1 |
---|
| 288 | - Update to 0.30 |
---|
| 289 | - Fix a bug with the Sub::Quoted sub returned by $type->coercion_sub; if a |
---|
| 290 | type had more than one coercion, the generated sub could end up coercing |
---|
| 291 | the value to undef some of the time and, depending on hash key ordering, |
---|
| 292 | this could end up being a heisenbug that only occurred some of the time |
---|
| 293 | |
---|
| 294 | * Mon Oct 10 2016 Paul Howarth <paul@city-fan.org> - 0.29-1 |
---|
| 295 | - Update to 0.29 |
---|
| 296 | - Document Specio::PartialDump because you may want to use it as part of the |
---|
| 297 | failure message generation code for a type |
---|
| 298 | |
---|
| 299 | * Mon Oct 3 2016 Paul Howarth <paul@city-fan.org> - 0.28-1 |
---|
| 300 | - Update to 0.28 |
---|
| 301 | - Added a Test::Specio module to provide helpers for testing Specio libraries |
---|
| 302 | - Fixed another bug with a subtype of special types and inlining |
---|
| 303 | - Introduce sub-package perl-Test-Specio to avoid dependencies on Test::Fatal |
---|
| 304 | and Test::More in main package |
---|
| 305 | |
---|
| 306 | * Sun Oct 2 2016 Paul Howarth <paul@city-fan.org> - 0.27-1 |
---|
| 307 | - Update to 0.27 |
---|
| 308 | - Cloning a type with coercions defined on it would cause an exception |
---|
| 309 | - Creating a subtype of a special type created by *_isa_type, *_can_type, or |
---|
| 310 | *_does_type, or enum would die when trying to inline type constraint |
---|
| 311 | - Removed the never-documented Any type |
---|
| 312 | - Added documentation for each type in Specio::Library::Builtins |
---|
| 313 | |
---|
| 314 | * Mon Sep 26 2016 Paul Howarth <paul@city-fan.org> - 0.26-1 |
---|
| 315 | - Update to 0.26 |
---|
| 316 | - Require Role::Tiny 1.003003, which should fix some test failures |
---|
| 317 | |
---|
| 318 | * Mon Sep 5 2016 Paul Howarth <paul@city-fan.org> - 0.25-1 |
---|
| 319 | - Update to 0.25 |
---|
| 320 | - Calling {any,object}_{isa,does}_type repeatedly in a package with the same |
---|
| 321 | class or role name would die; these subs are now special-cased to simply |
---|
| 322 | return an existing type for the given name when they receive a single |
---|
| 323 | argument (the name of the class or role) |
---|
| 324 | |
---|
| 325 | * Fri Jul 1 2016 Paul Howarth <paul@city-fan.org> - 0.24-2 |
---|
| 326 | - Sanitize for Fedora submission |
---|
| 327 | |
---|
| 328 | * Fri Jul 1 2016 Paul Howarth <paul@city-fan.org> - 0.24-1 |
---|
| 329 | - Initial RPM version |
---|