Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: more flexibility in creating type constraints #6

Merged
merged 2 commits into from
Dec 15, 2024

Conversation

kfly8
Copy link
Owner

@kfly8 kfly8 commented Dec 14, 2024

This pull request provides more flexibility in creating type constraints.

BEFORE

  1. Allows a object having a check method.
  2. Allows a code reference which makes Type::Tiny object

AFTER

In addition, add the following ways.

  1. Allows Data::Validator, Poz which does not have a check method.
  2. Allows a hash reference which makes Type::Tiny object

And if you want to customize constraint, you can use create_constraint function to customize.

@kfly8 kfly8 force-pushed the support-your-favorite-constraint branch 2 times, most recently from fb4d4f0 to 096a3cd Compare December 15, 2024 07:03
@kfly8 kfly8 changed the title wip Feature: CONSTRAINT also allows Data::Validator, Poz and hashref Dec 15, 2024
@kfly8 kfly8 self-assigned this Dec 15, 2024
@kfly8 kfly8 marked this pull request as ready for review December 15, 2024 07:15
1. Allows a object having  a `check` method.
2. Allows a code reference which makes Type::Tiny object

In addition, add the following ways.

3. Allows Data::Validator, Poz which does not have a `check` method.
4. Allows a hash reference which makes Type::Tiny object

And if you want to customize constraint, you can use `create_constraint` function to customize.
@kfly8 kfly8 force-pushed the support-your-favorite-constraint branch from 096a3cd to 9b71e92 Compare December 15, 2024 07:18
@kfly8 kfly8 changed the title Feature: CONSTRAINT also allows Data::Validator, Poz and hashref Feature: more flexibility in creating type constraints Dec 15, 2024
@kfly8 kfly8 merged commit 4ba8623 into main Dec 15, 2024
28 checks passed
kfly8 added a commit that referenced this pull request Dec 15, 2024
Changelog diff is:

diff --git a/Changes b/Changes
index bc80bca..d17a020 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,8 @@
 Revision history for Perl extension kura
 
 {{$NEXT}}
+
+0.07 2024-12-15T07:59:25Z
     - Feature: more flexibility in creating type constraints #6
 
 0.06 2024-12-10T00:43:29Z
@kfly8 kfly8 deleted the support-your-favorite-constraint branch December 15, 2024 14:01
kfly8 added a commit that referenced this pull request Dec 16, 2024
Changelog diff is:

diff --git a/Changes b/Changes
index d17a020..783c9f1 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,9 @@ Revision history for Perl extension kura
 
 {{$NEXT}}
 
+0.08 2024-12-16T00:44:13Z
+    - Assign name for anon type tiny #8
+
 0.07 2024-12-15T07:59:25Z
     - Feature: more flexibility in creating type constraints #6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant