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

Type constraints are stored in @KURA #3

Merged
merged 2 commits into from
Dec 1, 2024
Merged

Type constraints are stored in @KURA #3

merged 2 commits into from
Dec 1, 2024

Conversation

kfly8
Copy link
Owner

@kfly8 kfly8 commented Nov 30, 2024

This pull request provides the method get type constraints list, it is useful for exporting type constraints by %EXPORT_TAGS. Here is an example code:

    package MyBar {
        use Exporter 'import';
        use Types::Common -types;
        use kura Bar1 => StrLength[1, 255];
        use kura Bar2 => StrLength[1, 1000];

        our %EXPORT_TAGS = (
            types => \@MyBar::KURA,
        );
    }

    use MyBar qw(:types);
    # => Bar1, Bar2 are exported

@kfly8 kfly8 self-assigned this Nov 30, 2024
@kfly8 kfly8 changed the title types defined by kura are stored in $PACKAGE::KURA Types constraints are stored in @KURA Dec 1, 2024
@kfly8 kfly8 changed the title Types constraints are stored in @KURA Type constraints are stored in @KURA Dec 1, 2024
@kfly8 kfly8 merged commit b1df5f5 into main Dec 1, 2024
28 checks passed
kfly8 added a commit that referenced this pull request Dec 7, 2024
Changelog diff is:

diff --git a/Changes b/Changes
index 1e8652c..9556cb1 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,10 @@ Revision history for Perl extension kura
 
 {{$NEXT}}
 
+0.05 2024-12-07T11:40:25Z
+    - Improve docs and tests #4
+    - Add @kura variable #3
+
 0.04 2024-11-25T01:22:39Z
     - Support builtin class #2
     - BREAKING CHANGES #2
kfly8 added a commit that referenced this pull request Dec 10, 2024
Changelog diff is:

diff --git a/Changes b/Changes
index 9556cb1..d0c187f 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,9 @@ Revision history for Perl extension kura
 
 {{$NEXT}}
 
+0.06 2024-12-10T00:43:29Z
+    - Feature: store private constraints #5
+
 0.05 2024-12-07T11:40:25Z
     - Improve docs and tests #4
     - Add @kura variable #3
@kfly8 kfly8 deleted the export-tags branch December 15, 2024 14:01
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