Skip Menu |

This queue is for tickets about the Lexical-SealRequireHints CPAN distribution.

Report information
The Basics
Id: 93759
Status: resolved
Priority: 0/
Queue: Lexical-SealRequireHints

People
Owner: Nobody in particular
Requestors: CHORNY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.007
Fixed in: (no value)



Subject: does not work with utf8::all
C:\>perl -e"require Method::Signatures; require utf8::all" Global symbol "$have_encoded_argv" requires explicit package name at C:/strawberry/perl/site/lib/utf8/all.pm line 28. Global symbol "$have_encoded_argv" requires explicit package name at C:/strawberry/perl/site/lib/utf8/all.pm line 29. Compilation failed in require at -e line 1. Latest versions of both modules, perl 5.10.1. Does not happen on 5.18.1, 5.16.0. -- Alexandr Ciornii, http://chorny.net
Subject: Re: [rt.cpan.org #93759] does not work with utf8::all
Date: Tue, 11 Mar 2014 13:10:00 -0700
To: bug-Method-Signatures [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
The problem is the state feature is turned off inside utf8::all... somehow. I can reduce this down to a weird interaction between "use v5.10" and something in Method::Signatures. # "Hello" use v5.10; say "Hello"; # "Hello" use v5.10; use Method::Signatures; say "Hello"; # Error use Method::Signatures; use v5.10; say "Hello"; String found where operator expected at /Users/schwern/tmp/test.pl line 4, near "say "Hello"" (Do you need to predeclare say?) syntax error at /Users/schwern/tmp/test.pl line 4, near "say "Hello"" Execution of /Users/schwern/tmp/test.pl aborted due to compilation errors. The problem is the 5.10 features aren't being turned on. It's specific to the "use v5.10" syntax because "use feature ':5.10'" works. And it's strange that the order of operations matters. I wonder if something MS is doing is corrupting %^H and/or tickling a bug. MooseX::Method::Signatures doesn't have this problem, which suggests, but does not rule out, a Devel::Declare problem.
Subject: Re: [rt.cpan.org #93759] does not work with utf8::all
Date: Tue, 11 Mar 2014 13:12:56 -0700
To: bug-Method-Signatures [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
It's something about Lexical::SealRequireHints. Remove that and it all works.
This works on 5.10.1.

    use v5.10;
    use Lexical::SealRequireHints;
    say "Hello";

This errors, the say feature is not loaded.

    # String found where operator expected at /Users/schwern/tmp/test.pl line 3, near "say "Hello""
    #    (Do you need to predeclare say?)
    # syntax error at /Users/schwern/tmp/test.pl line 3, near "say "Hello""
    # Execution of /Users/schwern/tmp/test.pl aborted due to compilation errors.

    use Lexical::SealRequireHints;
    use v5.10;
    say "Hello";

But the plot thickens!  This works.

    use Lexical::SealRequireHints;
    use feature ':5.10';
    say "Hello";
Fixed in Lexical-SealRequireHints-0.008, now on CPAN.