Comments (8)
This was on Perl v5.34.0
from p5-type-tiny.
I don't get this warning myself, and I do my development on 5.34.0. This should hopefully fix any uninitialized warnings from that line though:
from p5-type-tiny.
I'm getting similar messages under 5.36 using 1.016009, but only when using wrap_subs:
package Bug;
use v5.10;
use strict;
use warnings;
use Types::Standard -all;
use Type::Params -all;
sub query {
# state $check = compile_named( a => Any );
# @_ = $check->( @_ );
use Data::Dumper;
print Dumper( \@_ ), "\n";
}
wrap_subs query => compile_named( a => Any );
1;
% perl -I. -MBug -e 'Bug::query(a => q{b})'
Use of uninitialized value in sprintf at [...]/Type/Params/Signature.pm line 183.
Use of uninitialized value in sprintf at [...]/Type/Params/Signature.pm line 183.
$VAR1 = [
{
'a' => 'b'
}
];
Switching over to the state
version proceeds without complaint.
On occasion I'm also able to elicit the following errors:
Use of uninitialized value $package in concatenation (.) or string at [...]/Type/Params/Signature.pm line 551.
Use of uninitialized value $subname in concatenation (.) or string at [...]/Type/Params/Signature.pm line 551.
but I need to re-discover the combination that leads that error.
from p5-type-tiny.
This will emit both errors:
package Bug;
use v5.36;
use Types::Standard -all;
use Type::Params -all;
wrap_subs query => compile_named_oo(
uploads => Optional [HashRef],
);
sub query {}
1;
% perl -I. -MBug -e 'Bug::query'
Use of uninitialized value in sprintf at [...]/Type/Params/Signature.pm line 183.
Use of uninitialized value in sprintf at [...]/Type/Params/Signature.pm line 183.
Use of uninitialized value $package in concatenation (.) or string at [...]/Type/Params/Signature.pm line 551.
Use of uninitialized value $subname in concatenation (.) or string at [...]/Type/Params/Signature.pm line 551.
from p5-type-tiny.
I'm very sorry, I mistakenly tested this on 1.016000 instead of 1.016009.
The "uninitialized value in sprintf" error is gone, but the uninitialized values of $package
and $subname
is still there as of 1.016009.
In other words, the last example code I provided above emits this under 1.016009:
Use of uninitialized value $package in concatenation (.) or string at [...]/Type/Params/Signature.pm line 619.
Use of uninitialized value $subname in concatenation (.) or string at [...]/Type/Params/Signature.pm line 619.
Shall I open a new issue for this?
from p5-type-tiny.
I'll just reopen.
from p5-type-tiny.
Fixed in 1.016010.
from p5-type-tiny.
Thanks!
from p5-type-tiny.
Related Issues (20)
- Using `declare` with a parent->plus_coercions seems to fail HOT 1
- Add a **BoolLike** type to Types::TypeTiny HOT 7
- Use of uninitialized value $i in pattern match (m//) HOT 7
- slurpy parameter cannot be optional HOT 3
- RFE: Type::Params: coerce undef to default value HOT 2
- Call to `tie` does not initialize variable as documented
- BoolLike in Types::TypeTiny should check `!` overloading to support boolean.pm HOT 2
- doc improvement: use strict
- Status of parameterized coercion API?
- Incorrect API docs for Type::Tiny::coercion_generator HOT 1
- cannot pass type parameter to is_InstanceOf()
- how to avoid loading class you want to coerce to?
- error in Type::Tiny::validate_explain for parameterized types without parents
- empty string expected when tying an undefined variable to a Str type constraint
- Document that Type::Tiny "coercion" attribute accepts arrayref to be passed to add_type_coercions
- Type::Params: unexpected error when die'ing in goto_next in a multiple signature HOT 1
- Optional accepts multiple parameters, only uses the first, but refers to all of them in error messages
- Tests failing for perls built with quadmath and having Type-Tiny-XS installed
- "Use of uninitialized value in pattern match" warning when calling Type::Params wrapped func from minimum call stack
- Type::Tiny failing on CPANtesters; smartmatch is gone HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p5-type-tiny.