Git Product home page Git Product logo

Comments (8)

robrwo avatar robrwo commented on August 26, 2024

This was on Perl v5.34.0

from p5-type-tiny.

tobyink avatar tobyink commented on August 26, 2024

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:

515e56c

from p5-type-tiny.

djerius avatar djerius commented on August 26, 2024

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.

djerius avatar djerius commented on August 26, 2024

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.

djerius avatar djerius commented on August 26, 2024

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.

tobyink avatar tobyink commented on August 26, 2024

I'll just reopen.

from p5-type-tiny.

tobyink avatar tobyink commented on August 26, 2024

Fixed in 1.016010.

from p5-type-tiny.

djerius avatar djerius commented on August 26, 2024

Thanks!

from p5-type-tiny.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.