2016-07-22 15:10:25 +00:00
|
|
|
Name: perl-Specio
|
2017-01-30 11:38:42 +00:00
|
|
|
Version: 0.34
|
2016-11-07 09:31:51 +00:00
|
|
|
Release: 1%{?dist}
|
2016-07-22 15:10:25 +00:00
|
|
|
Summary: Type constraints and coercions for Perl
|
|
|
|
License: Artistic 2.0
|
|
|
|
URL: http://search.cpan.org/dist/Specio/
|
|
|
|
Source0: http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Specio-%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
|
|
# Module Build
|
|
|
|
BuildRequires: coreutils
|
|
|
|
BuildRequires: make
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-generators
|
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
|
|
|
# Module Runtime
|
|
|
|
BuildRequires: perl(B)
|
|
|
|
BuildRequires: perl(Carp)
|
|
|
|
BuildRequires: perl(Devel::StackTrace)
|
|
|
|
BuildRequires: perl(Eval::Closure)
|
|
|
|
BuildRequires: perl(Exporter)
|
2016-10-03 10:51:56 +00:00
|
|
|
BuildRequires: perl(IO::File)
|
2016-07-22 15:10:25 +00:00
|
|
|
BuildRequires: perl(List::Util) >= 1.33
|
|
|
|
BuildRequires: perl(MRO::Compat)
|
|
|
|
BuildRequires: perl(overload)
|
|
|
|
BuildRequires: perl(parent)
|
|
|
|
BuildRequires: perl(re)
|
2017-01-30 11:38:42 +00:00
|
|
|
BuildRequires: perl(Ref::Util) >= 0.112
|
2016-09-26 10:16:21 +00:00
|
|
|
BuildRequires: perl(Role::Tiny) >= 1.003003
|
2016-07-22 15:10:25 +00:00
|
|
|
BuildRequires: perl(Role::Tiny::With)
|
|
|
|
BuildRequires: perl(Scalar::Util)
|
|
|
|
BuildRequires: perl(Storable)
|
|
|
|
BuildRequires: perl(strict)
|
2016-10-03 10:51:56 +00:00
|
|
|
BuildRequires: perl(Test::Fatal)
|
|
|
|
BuildRequires: perl(Test::More) >= 0.96
|
2016-07-22 15:10:25 +00:00
|
|
|
BuildRequires: perl(version) >= 0.83
|
|
|
|
BuildRequires: perl(warnings)
|
|
|
|
# Test Suite
|
|
|
|
BuildRequires: perl(File::Spec)
|
|
|
|
BuildRequires: perl(lib)
|
|
|
|
BuildRequires: perl(open)
|
|
|
|
BuildRequires: perl(Test::Needs)
|
|
|
|
BuildRequires: perl(utf8)
|
|
|
|
# Optional Tests
|
|
|
|
BuildRequires: perl(CPAN::Meta) >= 2.120900
|
|
|
|
BuildRequires: perl(CPAN::Meta::Prereqs)
|
|
|
|
BuildRequires: perl(Moo)
|
2016-10-20 07:17:36 +00:00
|
|
|
%if !%{defined perl_bootstrap}
|
|
|
|
# Break cycle: perl-Moose → perl-DateTime → perl-Specio
|
2016-07-22 15:10:25 +00:00
|
|
|
BuildRequires: perl(Moose) >= 2.1207
|
2016-10-20 07:17:36 +00:00
|
|
|
# Break cycle: perl-Mouse → perl-Moose → perl-DateTime → perl-Specio
|
2016-07-22 15:10:25 +00:00
|
|
|
BuildRequires: perl(Mouse)
|
2016-10-20 07:17:36 +00:00
|
|
|
%endif
|
2016-07-22 15:10:25 +00:00
|
|
|
BuildRequires: perl(namespace::autoclean)
|
|
|
|
# Dependencies
|
|
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
2017-01-30 11:38:42 +00:00
|
|
|
Requires: perl(Ref::Util) >= 0.112
|
2016-07-22 15:10:25 +00:00
|
|
|
|
2016-10-03 10:51:56 +00:00
|
|
|
# Avoid provides for private packages
|
|
|
|
%global __provides_exclude ^perl\\(_T::.*\\)
|
|
|
|
|
2016-07-22 15:10:25 +00:00
|
|
|
%description
|
|
|
|
The Specio distribution provides classes for representing type constraints
|
|
|
|
and coercion, along with syntax sugar for declaring them.
|
|
|
|
|
|
|
|
Note that this is not a proper type system for Perl. Nothing in this
|
|
|
|
distribution will magically make the Perl interpreter start checking a value's
|
|
|
|
type on assignment to a variable. In fact, there's no built-in way to apply a
|
|
|
|
type to a variable at all.
|
|
|
|
|
|
|
|
Instead, you can explicitly check a value against a type, and optionally coerce
|
|
|
|
values to that type.
|
|
|
|
|
2016-10-03 10:51:56 +00:00
|
|
|
%package -n perl-Test-Specio
|
|
|
|
Summary: Test helpers for Specio
|
|
|
|
License: Artistic 2.0
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n perl-Test-Specio
|
|
|
|
This package provides some helper functions and variables for testing Specio
|
|
|
|
types.
|
|
|
|
|
2016-07-22 15:10:25 +00:00
|
|
|
%prep
|
|
|
|
%setup -q -n Specio-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=%{buildroot}
|
2016-11-07 09:31:51 +00:00
|
|
|
%{_fixperms} -c %{buildroot}
|
2016-07-22 15:10:25 +00:00
|
|
|
|
|
|
|
%check
|
|
|
|
make test
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE
|
2017-01-13 10:05:56 +00:00
|
|
|
%doc Changes CONTRIBUTING.md README.md TODO.md
|
2016-07-22 15:10:25 +00:00
|
|
|
%{perl_vendorlib}/Specio.pm
|
|
|
|
%{perl_vendorlib}/Specio/
|
|
|
|
%{_mandir}/man3/Specio.3*
|
|
|
|
%{_mandir}/man3/Specio::Coercion.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::AnyCan.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::AnyDoes.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::AnyIsa.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::Enum.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::Intersection.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::ObjectCan.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::ObjectDoes.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::ObjectIsa.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::Parameterizable.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::Parameterized.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::Role::CanType.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::Role::DoesType.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::Role::Interface.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::Role::IsaType.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::Simple.3*
|
2017-01-30 11:38:42 +00:00
|
|
|
%{_mandir}/man3/Specio::Constraint::Structurable.3*
|
|
|
|
%{_mandir}/man3/Specio::Constraint::Structured.3*
|
2016-07-22 15:10:25 +00:00
|
|
|
%{_mandir}/man3/Specio::Constraint::Union.3*
|
|
|
|
%{_mandir}/man3/Specio::Declare.3*
|
|
|
|
%{_mandir}/man3/Specio::DeclaredAt.3*
|
|
|
|
%{_mandir}/man3/Specio::Exception.3*
|
|
|
|
%{_mandir}/man3/Specio::Exporter.3*
|
|
|
|
%{_mandir}/man3/Specio::Helpers.3*
|
|
|
|
%{_mandir}/man3/Specio::Library::Builtins.3*
|
|
|
|
%{_mandir}/man3/Specio::Library::Numeric.3*
|
|
|
|
%{_mandir}/man3/Specio::Library::Perl.3*
|
|
|
|
%{_mandir}/man3/Specio::Library::String.3*
|
2017-01-30 11:38:42 +00:00
|
|
|
%{_mandir}/man3/Specio::Library::Structured.3*
|
|
|
|
%{_mandir}/man3/Specio::Library::Structured::Dict.3*
|
|
|
|
%{_mandir}/man3/Specio::Library::Structured::Map.3*
|
|
|
|
%{_mandir}/man3/Specio::Library::Structured::Tuple.3*
|
2016-07-22 15:10:25 +00:00
|
|
|
%{_mandir}/man3/Specio::OO.3*
|
|
|
|
%{_mandir}/man3/Specio::PartialDump.3*
|
|
|
|
%{_mandir}/man3/Specio::Registry.3*
|
|
|
|
%{_mandir}/man3/Specio::Role::Inlinable.3*
|
|
|
|
%{_mandir}/man3/Specio::TypeChecks.3*
|
|
|
|
|
2016-10-03 10:51:56 +00:00
|
|
|
%files -n perl-Test-Specio
|
|
|
|
%{perl_vendorlib}/Test/
|
|
|
|
%{_mandir}/man3/Test::Specio.3*
|
|
|
|
|
2016-07-22 15:10:25 +00:00
|
|
|
%changelog
|
2017-01-30 11:38:42 +00:00
|
|
|
* Mon Jan 30 2017 Paul Howarth <paul@city-fan.org> - 0.34-1
|
|
|
|
- Update to 0.34
|
|
|
|
- Packages with Specio::Exporter can now specify additional arbitrary subs to
|
|
|
|
exporter; see the Specio::Exporter docs for details
|
|
|
|
- Importing the same library twice in a given package would throw an
|
|
|
|
exception; the second attempt to import is now ignored
|
|
|
|
|
2017-01-25 11:57:10 +00:00
|
|
|
* Wed Jan 25 2017 Paul Howarth <paul@city-fan.org> - 0.33-1
|
|
|
|
- Update to 0.33
|
|
|
|
- Fixed a mistake in the SYNOPSIS for Specio::Declare; the example for the
|
2017-01-30 11:38:42 +00:00
|
|
|
*_isa_type helpers was not correct
|
2017-01-25 11:57:10 +00:00
|
|
|
- Removed the alpha warning from the docs; this is being used by enough of my
|
|
|
|
modules on CPAN that I don't plan on doing any big breaking changes without
|
|
|
|
a deprecation first
|
|
|
|
|
2017-01-13 10:05:56 +00:00
|
|
|
* Fri Jan 13 2017 Paul Howarth <paul@city-fan.org> - 0.32-1
|
|
|
|
- Update to 0.32
|
|
|
|
- Fixed a bug in the inlining for types create by any_can_type() and
|
|
|
|
object_can_type(); this inlining mostly worked by accident because of some
|
2017-01-25 11:57:10 +00:00
|
|
|
List::Util XS magic, but this broke under the debugger (GH#6,
|
2017-01-13 10:05:56 +00:00
|
|
|
https://github.com/houseabsolute/DateTime.pm/issues/49)
|
|
|
|
|
2016-11-07 09:31:51 +00:00
|
|
|
* Mon Nov 7 2016 Paul Howarth <paul@city-fan.org> - 0.31-1
|
|
|
|
- Update to 0.31
|
|
|
|
- The stack trace contained by Specio::Exception objects no longer includes
|
|
|
|
stack frames for the Specio::Exception package
|
|
|
|
- Made the inline_environment() and description() methods public on type and
|
|
|
|
coercion objects
|
|
|
|
|
2016-10-20 07:17:36 +00:00
|
|
|
* Thu Oct 20 2016 Petr Pisar <ppisar@redhat.com> - 0.30-2
|
|
|
|
- Break build cycle: perl-Moose → perl-DateTime → perl-Specio
|
|
|
|
|
2016-10-16 11:11:38 +00:00
|
|
|
* Sun Oct 16 2016 Paul Howarth <paul@city-fan.org> - 0.30-1
|
|
|
|
- Update to 0.30
|
|
|
|
- Fix a bug with the Sub::Quoted sub returned by $type->coercion_sub; if a
|
|
|
|
type had more than one coercion, the generated sub could end up coercing
|
|
|
|
the value to undef some of the time and, depending on hash key ordering,
|
2016-11-07 09:31:51 +00:00
|
|
|
this could end up being a heisenbug that only occurred some of the time
|
2016-10-16 11:11:38 +00:00
|
|
|
|
2016-10-10 12:59:00 +00:00
|
|
|
* Mon Oct 10 2016 Paul Howarth <paul@city-fan.org> - 0.29-1
|
|
|
|
- Update to 0.29
|
|
|
|
- Document Specio::PartialDump because you may want to use it as part of the
|
|
|
|
failure message generation code for a type
|
|
|
|
|
2016-10-03 10:51:56 +00:00
|
|
|
* Mon Oct 3 2016 Paul Howarth <paul@city-fan.org> - 0.28-1
|
|
|
|
- Update to 0.28
|
|
|
|
- Added a Test::Specio module to provide helpers for testing Specio libraries
|
|
|
|
- Fixed another bug with a subtype of special types and inlining
|
|
|
|
- Introduce sub-package perl-Test-Specio to avoid dependencies on Test::Fatal
|
|
|
|
and Test::More in main package
|
|
|
|
|
2016-10-02 10:19:47 +00:00
|
|
|
* Sun Oct 2 2016 Paul Howarth <paul@city-fan.org> - 0.27-1
|
|
|
|
- Update to 0.27
|
|
|
|
- Cloning a type with coercions defined on it would cause an exception
|
|
|
|
- Creating a subtype of a special type created by *_isa_type, *_can_type, or
|
|
|
|
*_does_type, or enum would die when trying to inline type constraint
|
|
|
|
- Removed the never-documented Any type
|
|
|
|
- Added documentation for each type in Specio::Library::Builtins
|
|
|
|
|
2016-09-26 10:16:21 +00:00
|
|
|
* Mon Sep 26 2016 Paul Howarth <paul@city-fan.org> - 0.26-1
|
|
|
|
- Update to 0.26
|
|
|
|
- Require Role::Tiny 1.003003, which should fix some test failures
|
|
|
|
|
2016-09-05 08:24:20 +00:00
|
|
|
* Mon Sep 5 2016 Paul Howarth <paul@city-fan.org> - 0.25-1
|
|
|
|
- Update to 0.25
|
|
|
|
- Calling {any,object}_{isa,does}_type repeatedly in a package with the same
|
|
|
|
class or role name would die; these subs are now special-cased to simply
|
|
|
|
return an existing type for the given name when they receive a single
|
|
|
|
argument (the name of the class or role)
|
|
|
|
|
2016-07-22 15:10:25 +00:00
|
|
|
* Fri Jul 1 2016 Paul Howarth <paul@city-fan.org> - 0.24-2
|
|
|
|
- Sanitize for Fedora submission
|
|
|
|
|
|
|
|
* Fri Jul 1 2016 Paul Howarth <paul@city-fan.org> - 0.24-1
|
|
|
|
- Initial RPM version
|