summaryrefslogtreecommitdiff
path: root/lib/Type/Tiny
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2023-01-02 12:38:52 +0100
committerJonas Smedegaard <dr@jones.dk>2023-01-02 12:38:52 +0100
commita38b05357b20ef15ca83800e28f1fb44e6c6b87b (patch)
tree14d7988daaf185faee2d37857b4bfd37448b3006 /lib/Type/Tiny
parent1e2074ab6e5a2b953591c5c912e23cedffea8402 (diff)
parent5bdc3f3302539003af87a9149b3e8b4dcd3ec626 (diff)
New upstream version 2.002000
Diffstat (limited to 'lib/Type/Tiny')
-rw-r--r--lib/Type/Tiny/Class.pm4
-rw-r--r--lib/Type/Tiny/ConstrainedObject.pm4
-rw-r--r--lib/Type/Tiny/Duck.pm10
-rw-r--r--lib/Type/Tiny/Enum.pm9
-rw-r--r--lib/Type/Tiny/Intersection.pm9
-rw-r--r--lib/Type/Tiny/Manual.pod2
-rw-r--r--lib/Type/Tiny/Manual/AllTypes.pod2
-rw-r--r--lib/Type/Tiny/Manual/Coercions.pod2
-rw-r--r--lib/Type/Tiny/Manual/Contributing.pod2
-rw-r--r--lib/Type/Tiny/Manual/Installation.pod2
-rw-r--r--lib/Type/Tiny/Manual/Libraries.pod2
-rw-r--r--lib/Type/Tiny/Manual/NonOO.pod2
-rw-r--r--lib/Type/Tiny/Manual/Optimization.pod6
-rw-r--r--lib/Type/Tiny/Manual/Params.pod2
-rw-r--r--lib/Type/Tiny/Manual/Policies.pod2
-rw-r--r--lib/Type/Tiny/Manual/UsingWithClassTiny.pod2
-rw-r--r--lib/Type/Tiny/Manual/UsingWithMite.pod2
-rw-r--r--lib/Type/Tiny/Manual/UsingWithMoo.pod4
-rw-r--r--lib/Type/Tiny/Manual/UsingWithMoo2.pod2
-rw-r--r--lib/Type/Tiny/Manual/UsingWithMoo3.pod2
-rw-r--r--lib/Type/Tiny/Manual/UsingWithMoose.pod2
-rw-r--r--lib/Type/Tiny/Manual/UsingWithMouse.pod2
-rw-r--r--lib/Type/Tiny/Manual/UsingWithOther.pod2
-rw-r--r--lib/Type/Tiny/Manual/UsingWithTestMore.pod2
-rw-r--r--lib/Type/Tiny/Role.pm4
-rw-r--r--lib/Type/Tiny/Union.pm9
-rw-r--r--lib/Type/Tiny/_DeclaredType.pm4
-rw-r--r--lib/Type/Tiny/_HalfOp.pm4
28 files changed, 60 insertions, 41 deletions
diff --git a/lib/Type/Tiny/Class.pm b/lib/Type/Tiny/Class.pm
index 94373b32..afc92300 100644
--- a/lib/Type/Tiny/Class.pm
+++ b/lib/Type/Tiny/Class.pm
@@ -6,7 +6,7 @@ use warnings;
BEGIN {
$Type::Tiny::Class::AUTHORITY = 'cpan:TOBYINK';
- $Type::Tiny::Class::VERSION = '2.000001';
+ $Type::Tiny::Class::VERSION = '2.002000';
}
$Type::Tiny::Class::VERSION =~ tr/_//d;
@@ -398,7 +398,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/ConstrainedObject.pm b/lib/Type/Tiny/ConstrainedObject.pm
index f463801c..3bb1d763 100644
--- a/lib/Type/Tiny/ConstrainedObject.pm
+++ b/lib/Type/Tiny/ConstrainedObject.pm
@@ -6,7 +6,7 @@ use warnings;
BEGIN {
$Type::Tiny::ConstrainedObject::AUTHORITY = 'cpan:TOBYINK';
- $Type::Tiny::ConstrainedObject::VERSION = '2.000001';
+ $Type::Tiny::ConstrainedObject::VERSION = '2.002000';
}
$Type::Tiny::ConstrainedObject::VERSION =~ tr/_//d;
@@ -234,7 +234,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2019-2022 by Toby Inkster.
+This software is copyright (c) 2019-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Duck.pm b/lib/Type/Tiny/Duck.pm
index 20dbf3f8..9e151847 100644
--- a/lib/Type/Tiny/Duck.pm
+++ b/lib/Type/Tiny/Duck.pm
@@ -6,7 +6,7 @@ use warnings;
BEGIN {
$Type::Tiny::Duck::AUTHORITY = 'cpan:TOBYINK';
- $Type::Tiny::Duck::VERSION = '2.000001';
+ $Type::Tiny::Duck::VERSION = '2.002000';
}
$Type::Tiny::Duck::VERSION =~ tr/_//d;
@@ -15,7 +15,6 @@ use Scalar::Util qw< blessed >;
sub _croak ($;@) { require Error::TypeTiny; goto \&Error::TypeTiny::croak }
-
use Exporter::Tiny 1.004001 ();
use Type::Tiny::ConstrainedObject ();
our @ISA = qw( Type::Tiny::ConstrainedObject Exporter::Tiny );
@@ -58,6 +57,11 @@ sub new {
return $proto->SUPER::new( %opts );
} #/ sub new
+sub _lockdown {
+ my ( $self, $callback ) = @_;
+ $callback->( $self->{methods} );
+}
+
sub methods { $_[0]{methods} }
sub inlined { $_[0]{inlined} ||= $_[0]->_build_inlined }
@@ -278,7 +282,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Enum.pm b/lib/Type/Tiny/Enum.pm
index a4ed8d6a..ef2eee8c 100644
--- a/lib/Type/Tiny/Enum.pm
+++ b/lib/Type/Tiny/Enum.pm
@@ -6,7 +6,7 @@ use warnings;
BEGIN {
$Type::Tiny::Enum::AUTHORITY = 'cpan:TOBYINK';
- $Type::Tiny::Enum::VERSION = '2.000001';
+ $Type::Tiny::Enum::VERSION = '2.002000';
}
$Type::Tiny::Enum::VERSION =~ tr/_//d;
@@ -84,6 +84,11 @@ sub new {
return $proto->SUPER::new( %opts );
} #/ sub new
+sub _lockdown {
+ my ( $self, $callback ) = @_;
+ $callback->( $self->{values}, $self->{unique_values} );
+}
+
sub new_union {
my $proto = shift;
my %opts = ( @_ == 1 ) ? %{ $_[0] } : @_;
@@ -641,7 +646,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Intersection.pm b/lib/Type/Tiny/Intersection.pm
index 86865c97..cab0a273 100644
--- a/lib/Type/Tiny/Intersection.pm
+++ b/lib/Type/Tiny/Intersection.pm
@@ -6,7 +6,7 @@ use warnings;
BEGIN {
$Type::Tiny::Intersection::AUTHORITY = 'cpan:TOBYINK';
- $Type::Tiny::Intersection::VERSION = '2.000001';
+ $Type::Tiny::Intersection::VERSION = '2.002000';
}
$Type::Tiny::Intersection::VERSION =~ tr/_//d;
@@ -85,6 +85,11 @@ sub new {
return $proto->SUPER::new( %opts );
} #/ sub new
+sub _lockdown {
+ my ( $self, $callback ) = @_;
+ $callback->( $self->{type_constraints} );
+}
+
sub type_constraints { $_[0]{type_constraints} }
sub constraint { $_[0]{constraint} ||= $_[0]->_build_constraint }
@@ -352,7 +357,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual.pod b/lib/Type/Tiny/Manual.pod
index 1470c41d..504b7e3b 100644
--- a/lib/Type/Tiny/Manual.pod
+++ b/lib/Type/Tiny/Manual.pod
@@ -218,7 +218,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/AllTypes.pod b/lib/Type/Tiny/Manual/AllTypes.pod
index c222c960..7fba2268 100644
--- a/lib/Type/Tiny/Manual/AllTypes.pod
+++ b/lib/Type/Tiny/Manual/AllTypes.pod
@@ -435,7 +435,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/Coercions.pod b/lib/Type/Tiny/Manual/Coercions.pod
index 6e47820f..a310ff57 100644
--- a/lib/Type/Tiny/Manual/Coercions.pod
+++ b/lib/Type/Tiny/Manual/Coercions.pod
@@ -442,7 +442,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/Contributing.pod b/lib/Type/Tiny/Manual/Contributing.pod
index 8b81c9ce..e561d16d 100644
--- a/lib/Type/Tiny/Manual/Contributing.pod
+++ b/lib/Type/Tiny/Manual/Contributing.pod
@@ -83,7 +83,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/Installation.pod b/lib/Type/Tiny/Manual/Installation.pod
index e51ebfe0..c59884c7 100644
--- a/lib/Type/Tiny/Manual/Installation.pod
+++ b/lib/Type/Tiny/Manual/Installation.pod
@@ -125,7 +125,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/Libraries.pod b/lib/Type/Tiny/Manual/Libraries.pod
index 00735250..0f0d8cdc 100644
--- a/lib/Type/Tiny/Manual/Libraries.pod
+++ b/lib/Type/Tiny/Manual/Libraries.pod
@@ -461,7 +461,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/NonOO.pod b/lib/Type/Tiny/Manual/NonOO.pod
index 17f20afd..9d89bb53 100644
--- a/lib/Type/Tiny/Manual/NonOO.pod
+++ b/lib/Type/Tiny/Manual/NonOO.pod
@@ -120,7 +120,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/Optimization.pod b/lib/Type/Tiny/Manual/Optimization.pod
index fea5e646..eae94b1f 100644
--- a/lib/Type/Tiny/Manual/Optimization.pod
+++ b/lib/Type/Tiny/Manual/Optimization.pod
@@ -56,8 +56,8 @@ L<Types::Common::Numeric> will be accelerated, as will the
B<NonEmptyStr> type constraint from L<Types::Common::String>.
The B<StringLike>, B<CodeLike>, B<HashLike>, and B<ArrayLike> types
-from L<Types::TypeTiny> will be accelerated, but parameterized
-B<HashLike> and B<ArrayLike> will not.
+from L<Types::TypeTiny> will be accelerated, including the parameterized
+versions of B<HashLike> and B<ArrayLike>.
L<Type::Tiny::Union> and L<Type::Tiny::Intersection> will also be
accelerated if their constituent type constraints are.
@@ -314,7 +314,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/Params.pod b/lib/Type/Tiny/Manual/Params.pod
index 5a774000..3584b8db 100644
--- a/lib/Type/Tiny/Manual/Params.pod
+++ b/lib/Type/Tiny/Manual/Params.pod
@@ -307,7 +307,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/Policies.pod b/lib/Type/Tiny/Manual/Policies.pod
index bd984e2b..0554eed0 100644
--- a/lib/Type/Tiny/Manual/Policies.pod
+++ b/lib/Type/Tiny/Manual/Policies.pod
@@ -161,7 +161,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/UsingWithClassTiny.pod b/lib/Type/Tiny/Manual/UsingWithClassTiny.pod
index b127b2b9..384dec35 100644
--- a/lib/Type/Tiny/Manual/UsingWithClassTiny.pod
+++ b/lib/Type/Tiny/Manual/UsingWithClassTiny.pod
@@ -147,7 +147,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/UsingWithMite.pod b/lib/Type/Tiny/Manual/UsingWithMite.pod
index 0023674c..ece2c21e 100644
--- a/lib/Type/Tiny/Manual/UsingWithMite.pod
+++ b/lib/Type/Tiny/Manual/UsingWithMite.pod
@@ -172,7 +172,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2022 by Toby Inkster.
+This software is copyright (c) 2022-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/UsingWithMoo.pod b/lib/Type/Tiny/Manual/UsingWithMoo.pod
index d1ffc7d0..1ebb4b20 100644
--- a/lib/Type/Tiny/Manual/UsingWithMoo.pod
+++ b/lib/Type/Tiny/Manual/UsingWithMoo.pod
@@ -700,7 +700,7 @@ It is possible to accept a variable number of values using B<Slurpy>:
my ( $self, $year, $races ) = $check->(@_);
for my $race (@$races) {
- push @{ $self->wins }, [$year, $win];
+ push @{ $self->wins }, [$year, $race];
}
return $self;
}
@@ -866,7 +866,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/UsingWithMoo2.pod b/lib/Type/Tiny/Manual/UsingWithMoo2.pod
index eeaec6ac..920ff2eb 100644
--- a/lib/Type/Tiny/Manual/UsingWithMoo2.pod
+++ b/lib/Type/Tiny/Manual/UsingWithMoo2.pod
@@ -373,7 +373,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/UsingWithMoo3.pod b/lib/Type/Tiny/Manual/UsingWithMoo3.pod
index be0d3c17..dc6b5f2b 100644
--- a/lib/Type/Tiny/Manual/UsingWithMoo3.pod
+++ b/lib/Type/Tiny/Manual/UsingWithMoo3.pod
@@ -376,7 +376,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/UsingWithMoose.pod b/lib/Type/Tiny/Manual/UsingWithMoose.pod
index 9ff990a5..e649ba0f 100644
--- a/lib/Type/Tiny/Manual/UsingWithMoose.pod
+++ b/lib/Type/Tiny/Manual/UsingWithMoose.pod
@@ -211,7 +211,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/UsingWithMouse.pod b/lib/Type/Tiny/Manual/UsingWithMouse.pod
index f89fe45c..4d0219cc 100644
--- a/lib/Type/Tiny/Manual/UsingWithMouse.pod
+++ b/lib/Type/Tiny/Manual/UsingWithMouse.pod
@@ -217,7 +217,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/UsingWithOther.pod b/lib/Type/Tiny/Manual/UsingWithOther.pod
index bd727a7d..40996847 100644
--- a/lib/Type/Tiny/Manual/UsingWithOther.pod
+++ b/lib/Type/Tiny/Manual/UsingWithOther.pod
@@ -197,7 +197,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Manual/UsingWithTestMore.pod b/lib/Type/Tiny/Manual/UsingWithTestMore.pod
index cb5e76ec..88ba05cb 100644
--- a/lib/Type/Tiny/Manual/UsingWithTestMore.pod
+++ b/lib/Type/Tiny/Manual/UsingWithTestMore.pod
@@ -89,7 +89,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Role.pm b/lib/Type/Tiny/Role.pm
index 75d92982..fd5a0133 100644
--- a/lib/Type/Tiny/Role.pm
+++ b/lib/Type/Tiny/Role.pm
@@ -6,7 +6,7 @@ use warnings;
BEGIN {
$Type::Tiny::Role::AUTHORITY = 'cpan:TOBYINK';
- $Type::Tiny::Role::VERSION = '2.000001';
+ $Type::Tiny::Role::VERSION = '2.002000';
}
$Type::Tiny::Role::VERSION =~ tr/_//d;
@@ -222,7 +222,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/Union.pm b/lib/Type/Tiny/Union.pm
index d13b5dd9..b5978d87 100644
--- a/lib/Type/Tiny/Union.pm
+++ b/lib/Type/Tiny/Union.pm
@@ -6,7 +6,7 @@ use warnings;
BEGIN {
$Type::Tiny::Union::AUTHORITY = 'cpan:TOBYINK';
- $Type::Tiny::Union::VERSION = '2.000001';
+ $Type::Tiny::Union::VERSION = '2.002000';
}
$Type::Tiny::Union::VERSION =~ tr/_//d;
@@ -87,6 +87,11 @@ sub new {
return $self;
} #/ sub new
+sub _lockdown {
+ my ( $self, $callback ) = @_;
+ $callback->( $self->{type_constraints} );
+}
+
sub type_constraints { $_[0]{type_constraints} }
sub constraint { $_[0]{constraint} ||= $_[0]->_build_constraint }
@@ -477,7 +482,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2014, 2017-2022 by Toby Inkster.
+This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/_DeclaredType.pm b/lib/Type/Tiny/_DeclaredType.pm
index 67e4e3b5..663cff50 100644
--- a/lib/Type/Tiny/_DeclaredType.pm
+++ b/lib/Type/Tiny/_DeclaredType.pm
@@ -6,7 +6,7 @@ use warnings;
BEGIN {
$Type::Tiny::_DeclaredType::AUTHORITY = 'cpan:TOBYINK';
- $Type::Tiny::_DeclaredType::VERSION = '2.000001';
+ $Type::Tiny::_DeclaredType::VERSION = '2.002000';
}
$Type::Tiny::_DeclaredType::VERSION =~ tr/_//d;
@@ -84,7 +84,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2013-2022 by Toby Inkster.
+This software is copyright (c) 2013-2023 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Type/Tiny/_HalfOp.pm b/lib/Type/Tiny/_HalfOp.pm
index 50625317..271f9d84 100644
--- a/lib/Type/Tiny/_HalfOp.pm
+++ b/lib/Type/Tiny/_HalfOp.pm
@@ -6,7 +6,7 @@ use warnings;
BEGIN {
$Type::Tiny::_HalfOp::AUTHORITY = 'cpan:TOBYINK';
- $Type::Tiny::_HalfOp::VERSION = '2.000001';
+ $Type::Tiny::_HalfOp::VERSION = '2.002000';
}
$Type::Tiny::_HalfOp::VERSION =~ tr/_//d;
@@ -81,7 +81,7 @@ Graham Knop E<lt>haarg@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2014, 2017-2022 by Graham Knop.
+This software is copyright (c) 2014, 2017-2023 by Graham Knop.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.