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
Inconsistent proto warnings #11438
Comments
From @cpansproutThe ‘%s() called too early to check prototype’ does not appear after a require. This inconsistency seems a little strange: $ perl -we 'require attributes; attributes::get(\$_)' $ perl -we 'attributes::get(\$_); use attributes' In both cases, the module is loaded after the call has been compiled. This can cause action at a distance. A script like this happens to work: #!perl -w And then the following is added, 200 lines further down: my $foo : bar; Then it starts to warn about the attributes::get() call. This can be very confusing. I’ve triggered a warning this way with almost every test I’ve added to t/op/attrs.t, only to have to correct it with a subsequent commit. Is it for backward compatibilty’s sake that ‘require attributes; attributes::get(\$_)’ doesn’t warn about the prototype? Flags: Site configuration information for perl 5.14.0: Configured by sprout at Wed May 11 13:45:58 PDT 2011. Summary of my perl5 (revision 5 version 14 subversion 0) configuration: Locally applied patches: @INC for perl 5.14.0: Environment for perl 5.14.0: |
From zefram@fysh.orgFather Chrysostomos wrote:
No, it's an implementation artifact. The mechanism is that during optree With "require", the module is loaded, and therefore the prototype $ perl -lwe 'foo(1); sub foo($) {} print "run"' In order to get the warning in all cases, you'd need to mark the GV rather I'm inclined to class this as "won't fix". I have plans to implement -zefram |
The RT System itself - Status changed from 'new' to 'open' |
From zefram@fysh.orgI wrote:
I released that stricture pragma a couple of weeks after that, as -zefram |
@xsawyerx - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#92704 (status was 'rejected')
Searchable as RT92704$
The text was updated successfully, but these errors were encountered: