-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Fix Type::Tiny->can and AUTOLOAD when the class "can't" #57
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #57 +/- ##
==========================================
+ Coverage 88.78% 88.80% +0.02%
==========================================
Files 36 36
Lines 3583 3583
Branches 984 984
==========================================
+ Hits 3181 3182 +1
Misses 62 62
+ Partials 340 339 -1
Continue to review full report at Codecov.
|
clrpackages
pushed a commit
to clearlinux-pkgs/perl-Type-Tiny
that referenced
this pull request
Aug 27, 2020
… version 1.010003 1.010003 2020-08-08 The Crazy 88 [ Bug Fixes ] - ClassName type constraint should treat empty @isa as if no @isa were defined, like Type::Tiny::XS. Fixes RT#132583. Szymon Nieznański++ <https://rt.cpan.org/Ticket/Display.html?id=132583> - Fix for Type::Tiny->can called as a class method. Meredith Howard++ <tobyink/p5-type-tiny#57> - Fix predeclared types in Type::Library. Meredith Howard++ <tobyink/p5-type-tiny#58> (NEWS truncated at 15 lines)
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this pull request
Sep 7, 2020
1.010006 2020-09-04 [ Bug Fixes ] - Eliminate recusion warnings when Type::Parser needs to parse complex types. Fixes RT#121957. Diab Jerius++ <https://rt.cpan.org/Ticket/Display.html?id=121957> [ Other ] - Better handling of coercions for pre-declared types in Type::Library. The type objects created before the type was properly defined will now lazily attempt to find coercions from the properly defined type once it becomes available. 1.010005 2020-08-26 - Improvements to $AvoidCallbacks support for Type::Tiny::{Class,Role,Duck,Enum,Union,Intersection}, and LaxNum, Ref, RegexpRef, FileHandle, Object, Overload, and Tied types from Types::Standard. 1.010004 2020-08-18 [ Bug Fixes ] - Fix XSifying Enum[] where the strings contain certain non-word characters. Andrew Ruder++ <tobyink/p5-type-tiny-xs#12> <tobyink/p5-type-tiny#59> - Type::Params compile_named using both the head and named_to_list options would cause compilation error. Fixes RT#132419. Hauke D++ Sandor Patocs++ <https://rt.cpan.org/Ticket/Display.html?id=132419> - Workaround RT#121957 by avoiding attempting to XSify Enum type constraints with more than 50 possible strings. Fixes RT#121957. Diab Jerius++ <https://rt.cpan.org/Ticket/Display.html?id=121957> [ Documentation ] - Link to HTTPS version of Type::Tiny web page. 1.010003 2020-08-08 The Crazy 88 [ Bug Fixes ] - ClassName type constraint should treat empty @isa as if no @isa were defined, like Type::Tiny::XS. Fixes RT#132583. Szymon Nieznański++ <https://rt.cpan.org/Ticket/Display.html?id=132583> - Fix for Type::Tiny->can called as a class method. Meredith Howard++ <tobyink/p5-type-tiny#57> - Fix predeclared types in Type::Library. Meredith Howard++ <tobyink/p5-type-tiny#58> [ Documentation ] - Document some edge cases for Types::Standard Int. <https://rt.cpan.org/Ticket/Display.html?id=132754>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! I caught this issue today after a dependency update. The change introduced here:
d11d043#diff-2d2f4240c6e6b48948f2efbb94166f60R1234
causes the following exception when can and AUTOLOAD are called as class methods and are falling through to return nada because they can't:
AUTOLOAD hits the same thing rather than reaching the croak "Can't locate ..."
I added a test for can/can't cases, hopefully in a good spot, and then moved the entire offending section within the
if (ref($self))
just above it, in both methods.