-
Notifications
You must be signed in to change notification settings - Fork 571
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
undefined hashref error reported on wrong line #8216
Comments
From david.hillman@livetext.comThis is a bug report for perl from david.hillman@livetext.com, The following script demonstrates the problem, which has been #!/usr/bin/perl use strict; # error is not thrown unless strict is used if (not $ARGV[0] or $ARGV[0] =~ 'bad_error') { sub good_error { print "in good_error\n"; sub bad_error { =pod =head1 Undefined Hashref at Wrong Line Number Script dies with this error message: The error message should read: The actual error message reports the line number of the last The error only occurs when the strict pragma is in use. Discovered when doing a this with DBI: while( %results = %{ $dbh->fetrow_hashref() } ) { # Do some stuff with %results some statement (error was reported on this line However, the script above proves that this issue is not DBI related. =head1 Script Usage undefined_hashref_line_num.pl --good-error|--bad-error Option --good-error dies with a diagnostic message and correct line =head1 Reproduced On =over =item * =item * =item * =back =cut Flags: Site configuration information for perl v5.8.6: Configured by root at Sun Mar 20 16:31:42 PST 2005. Summary of my perl5 (revision 5 version 8 subversion 6) configuration: Locally applied patches: @INC for perl v5.8.6: Environment for perl v5.8.6: -- |
From BQW10602@nifty.comOn Fri, 18 Nov 2005 17:08:05 -0800, David Hillman (via RT) <perlbug-followup@perl.org> wrote
(snip)
We should tell a hyphen from a underscore, right? Regards, |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Fri, Nov 18, 2005 at 05:08:05PM -0800, David Hillman wrote:
Thanks for the report. There are a number of similar bugs present in the p5pers: A generic fix to this would be attach the line number to *every* op rather -- |
From @smpetersOn Sat, Nov 19, 2005 at 11:39:58PM +0000, Dave Mitchell wrote:
Considering the number of bugs currently like this, and the number of questions Steve Peters |
From @jimcDave Mitchell wrote:
hmm. this may border on the grotesque, but hopefully I will have the assumptions & observations; - rarely need extra info. make it a pragma, ? - only tokenizer could know line-numbers with sufficient detail to - only machine-generated expressions will exceed 255 lines (this is - assume line-num per opcode is useful. - denser encodings are possible: - hang this optional cop-related info off the cop; then pointer overhead - create new cop sub-type that has the room for the extra info. ugly is as ugly does ;-) |
From @iabynOn Sat, Nov 19, 2005 at 11:39:58PM +0000, Dave Mitchell wrote:
(replying to myself..) A data point: adding the extra field to BASEOP shows that on a 32-bit system, adding a 'use Note that the 13% is an upper limit: it so happens that this respresents a -- |
From @TuxOn Sat, 19 Nov 2005 19:15:22 -0700, Jim Cromie <jim.cromie@gmail.com> wrote:
yes
Will people remember?
What a ver very very wrong assumption!
Oh, C++ comment.
-- |
From @nwc10On Sat, Nov 19, 2005 at 07:15:22PM -0700, Jim Cromie wrote:
Yes, I believe it would be, based on the number of (valid) bug reports we
Well, that use of 'bool' goes wrong because it's probably char, not a bit, the #ifndef HAS_BOOL but that's a comment on implementation details. It might work to use the
Well, or something possibly more sick. But based on all the SV pointer Nicholas Clark |
Migrated from rt.perl.org#37711 (status was 'open')
Searchable as RT37711$
The text was updated successfully, but these errors were encountered: