-
Notifications
You must be signed in to change notification settings - Fork 560
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
'Global symbol "$identifier" requires explicit package' error message #13732
Comments
From the.rob.dixon@gmail.comThis is a bug report for perl from the.rob.dixon@gmail.com, I believe it is high time that the error Global symbol "$identifier" requires explicit package be changed to something more appropriate. I assume it dates back Worst of all it confounds Perl beginners, who are the most likely I suggest something more like the simple Variable "$identifier" has not been declared is superior. I don't think there is any need at all to mention Flags: Site configuration information for perl 5.16.2: Configured by strawberry-perl at Fri Nov 2 00:34:53 2012. Summary of my perl5 (revision 5 version 16 subversion 2) configuration: Platform: Locally applied patches: @INC for perl 5.16.2: Environment for perl 5.16.2: |
From @rjbsThis does not strike me as a bad idea. -- |
The RT System itself - Status changed from 'new' to 'open' |
From rob.dixon@gmx.comOn 14/04/2014 15:36, Ricardo SIGNES via RT wrote:
As always with Perl, I think the biggest problem will be with Google is now the primary route to an analysis of any error message, and Of course, that is not to say that irrelevant messages should be kept in This email is free from viruses and malware because avast! Antivirus protection is active. |
From @SmylersRob Dixon writes:
I think it's a good idea. When teaching people Perl, I've found that The current wording basically reads the same as “Error: -41”, in that
Why? For somebody running an old version of Perl, the current Google For somebody running a new version with a changed error message, there And if the message achieves its aim in being better, fewer people will Smylers |
From ambrus@math.bme.huIf you're fixing old error messages, can you fix a few others too? 1. Remove 'Unquoted string "%s" may clash with future reserved word' ? These days, if perl5porters add a reserved word, it's protected by 'use feature' so it can't clash with a bareword in old code. 2. Improve 'Variable "%s" is not imported' which you get when you use the wrong slot of an existing glob, such as in 'use strict; our $x = [3,1,4]; my $n = $x[0];' ? The error has nothing to do with importing anything. Even the perldiags entry is confusing, because it keeps talking about importing from a module. |
From @ap* Ricardo SIGNES via RT <perlbug-followup@perl.org> [2014-04-14 16:40]:
I think it is in fact an excellent idea. Gabor has mentioned this error Gabor brought this up before, but the proposal went nowhere. :-( * Rob Dixon <rob.dixon@gmx.com> [2014-04-15 04:45]:
I agree that backcompat will be a problem, but I don’t think Google is If this *can* go into 5.22, that would be *excellent*, but I won’t be When Gabor brought this up, the perma-topic of having more structured Regards, |
From @khwilliamsonOn Tue Apr 15 02:38:00 2014, b_jonas wrote:
Could someone suggest better wording? |
From @ikegamiOn Tue, Jul 29, 2014 at 1:26 PM, Karl Williamson via RT <
Easy! Global symbol "@x" requires explicit package name at -e line 1. |
From @ikegamiOn Tue, Jul 29, 2014 at 10:14 PM, Eric Brine <ikegami@adaelis.com> wrote:
Well, that is to say, the same as the one received using 'use strict; my $n |
From @khwilliamsonI tried a CPAN smoke of changing this message. The high level results are attached as the first file. If I look at the failures, the ones which have the changed wording in their test output amount to 130 distinct distributions. The second attachment is an example of an expected failure there. But some of the failures are more like the third attachment. And looking at the smoke output, a lot of things failed because of failed prerequisites. Steffen doesn't understand it. The code is using cpanplus to compile things. And there is that the output says 2800 distributions are missing from the output; also something I and Steffen don't understand. So I'm not sure how to proceed. What do you think? -- |
From @khwilliamsonFrom: khw@example.com (Karl Williamson) -- Dear LUKEC, This is a computer-generated error report created automatically by Thank you for uploading your work to CPAN. However, it appears that TEST RESULTS: Below is the error stack from stage 'make test': /home/khw/perl/cpansmoke_testperls/error_msg/perl-error_msg/bin/perl "-Iinc" /var/tmp/qoNfVUnK59/.cpanplus/5.21.3/build/mocked-0.09/Makefile.PL --config= --installdeps=Test::Exception,0 Test Summary Report t/unmocked.t (Wstat: 512 Tests: 0 Failed: 0) MISSING PREREQUISITES: It was observed that the test suite seem to fail without these modules: URI As such, adding the prerequisite module(s) to 'PREREQ_PM' in your WriteMakefile( Thanks! :-) PREREQUISITES: Here is a list of prerequisites you specified and versions we Module Name Have Want Perl module toolchain versions installed: ******************************** NOTE ******************************** If you believe that the message is mistaken, please reply to the first Additional comments: This report was machine-generated by CPANPLUS::Dist::YACSmoke 0.90. ENVIRONMENT AND OTHER CONTEXT Environment variables: AUTOMATED_TESTING = 1 Perl special variables (and OS-specific diagnostics, for MSWin32): Perl: $^X = /home/khw/perl/cpansmoke_testperls/error_msg/perl-error_msg/bin/perl -- Summary of my perl5 (revision 5 version 21 subversion 3) configuration: Characteristics of this binary (from libperl): |
From @khwilliamsonFrom: khw@example.com (Karl Williamson) -- Dear Mons Anderson, This is a computer-generated error report created automatically by Thank you for uploading your work to CPAN. However, it appears that TEST RESULTS: Below is the error stack from stage 'make test': PERL_DL_NONLAZY=1 /home/khw/perl/cpansmoke_testperls/error_msg/perl-error_msg/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t # Failed test 'strict works' Test Summary Report t/01-tests.t (Wstat: 256 Tests: 11 Failed: 1) PREREQUISITES: Here is a list of prerequisites you specified and versions we Module Name Have Want Perl module toolchain versions installed: ******************************** NOTE ******************************** If you believe that the message is mistaken, please reply to the first Additional comments: This report was machine-generated by CPANPLUS::Dist::YACSmoke 0.90. ENVIRONMENT AND OTHER CONTEXT Environment variables: AUTOMATED_TESTING = 1 Perl special variables (and OS-specific diagnostics, for MSWin32): Perl: $^X = /home/khw/perl/cpansmoke_testperls/error_msg/perl-error_msg/bin/perl -- Summary of my perl5 (revision 5 version 21 subversion 3) configuration: Characteristics of this binary (from libperl): |
From @khwilliamsonIt appears that RT puts the attachments in the reverse order of what I said in the previous post |
From @rjbs* Karl Williamson via RT <perlbug-followup@perl.org> [2014-08-22T16:10:18]
Sigh. I'm flashing back to when we added a period to Carp's output. I would like to improve this error message, but I think that if we do it by This is something that could be governed by a pragma, at least until such time The down side is that now new users will only get the helpful error message if Anybody have a great idea? -- |
From @cpansproutOn Mon Sep 15 15:54:34 2014, perl.p5p@rjbs.manxome.org wrote:
I think I have an easy way out for now. Do what we did for ‘Can’t locate Rheubarbarum/Rheubarbarorum.pm in @INC’. Simply add ‘(Did you forget to declare "my $rhubarb"?)’. As for pragmata changing the wording of error messages, no, please let’s not go there. eval { mumbo_jumbo() }; # What’s that in Latin? What we really need are error codes, though.... -- Father Chrysostomos |
From @demerphqOn 16 September 2014 22:48, Father Chrysostomos via RT <
I have long argued we should do this. It would allow us to localize error If we agreed that this would be nice to have I would work on it. Yves |
From @rjbs* demerphq <demerphq@gmail.com> [2014-09-16T17:50:23]
This would be nice to have. -- |
From @demerphqOn 17 September 2014 00:15, Ricardo Signes <perl.p5p@rjbs.manxome.org>
Cool. Then I will be happy to lend a hand to make it happen. If someone Cheers, -- |
From @cpansproutOn Tue Sep 16 15:22:46 2014, demerphq wrote:
I think everyone agrees on that, but not on how it should be done.
But what do you think of my stopgap measure? (Global symbol "$custard" requires explicit package name (did you forget to declare "my $custard"?) at -e line 1.)
I already have detailed plans as to how it should be done. I had planned to do it after lvalue references. See ticket #122794. Let’s please move the discussion there. -- Father Chrysostomos |
From @karenetheridgeOn Mon, Sep 15, 2014 at 06:54:08PM -0400, Ricardo Signes wrote:
pragma: ew, please let's not. |
From @demerphqOn 17 September 2014 01:01, Father Chrysostomos via RT <
Ok, but below you say you have a plan. Which makes you "Stan, the man with
Willdo. Looking forward to reading it and working with you to accomplish it. Cheers, -- |
From @khwilliamsonOn 09/16/2014 05:01 PM, Father Chrysostomos via RT wrote:
+1 to trial it |
From @ap* Father Chrysostomos via RT <perlbug-followup@perl.org> [2014-09-16 22:50]:
Yes please! This sounds worth a shot. |
From @cpansproutOn Thu Sep 18 18:16:49 2014, aristotle wrote:
Added in d8c6310. This ticket is resolved. Let’s see how much of CPAN this breaks. :-) -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'resolved' |
From @khwilliamsonOn 09/18/2014 11:13 PM, Father Chrysostomos via RT wrote:
While you were off-list earlier this year, we decided to avoid using Andreas makes it look like it's easy to have these smokes, almost like But we need to get CPAN smokes more easy to do. I tried one, on this Dromedary should be available to do cpan smokes, but last I knew it |
From perl5-porters@perl.orgKarl Williamson wrote:
I meant that last sentence solely as a joke. Even if this does break Even if I had done a smoke first and found that Function::Parameters, |
From @karenetheridgeOn Fri, Sep 19, 2014 at 10:57:54PM -0000, Father Chrysostomos wrote:
Moose has been fixed in versions 2.1212 and 2.1303-TRIAL. You have my * this seems like a fun game. :) |
From @andk
> On 09/18/2014 11:13 PM, Father Chrysostomos via RT wrote:
> While you were off-list earlier this year, we decided to avoid using > Andreas makes it look like it's easy to have these smokes, almost like Thank you, Karl, for chiming in! But reality is: at the moment I haven't given up and we had similar bad phases in previous bleadperl I still ask for everybody's best effort to not just try things out on Thanks for listening, please goto coding:) |
Migrated from rt.perl.org#121638 (status was 'resolved')
Searchable as RT121638$
The text was updated successfully, but these errors were encountered: