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
A bug on constant overloading #9184
Comments
From g.psy.va@gmail.comThis is a bug report for perl from g.psy.va@gmail.com, I've found a bug on overload::constant() with escaped characters (e.g. Please try to do the attached test file, "tsh.t". I did it on perl 5.8.8 (for Cygwin), and 5.10.0 (for Windows and Cygwin), Thanks. Goro Fuji <g.psy.va@gmail.com> Flags: Site configuration information for perl 5.10.0: Configured by garo at Sun Jan 6 08:39:07 JST 2008. Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Locally applied patches: @INC for perl 5.10.0: Environment for perl 5.10.0: |
From g.psy.va@gmail.comI'm sorry to forget to attach a test file. This is the most important. |
From g.psy.va@gmail.com#!/usr/bin/perl -w sub import{ sub string_handler use Test::More tests => 5; my($v1, $v2, $v3, $v4, $v5); isa_ok $v1, 'TSH', '(success)'; diag( Data::Dumper->Dump([$v1, $v2, $v3, $v4, $v5], [qw(*v1 *v2 *v3 *v4 *v5)]) ); |
From @schwernGoro Fuji (via RT) wrote:
It's interesting that the stringification overloading is working, in the sense # This all passes. Devel::Peek shows the internal difference between $v1 and $v2. DB<5> x Dump $v1 DB<4> x Dump $v2 For some reason the overloadedness of the constant string is not being Probably just causing the code to go down a different path that misses the -- |
The RT System itself - Status changed from 'new' to 'open' |
From @doySo I tracked this through the lexer, and this is what I've come up with: When perl is reading a string, the first pass doesn't handle In the case of "$foo", this just builds an optree of stringify(padsv), In the case of "foo $bar baz", this is broken down into "foo " . $bar . In the case of "foo\tbar", it reads through the string, replaces \t with I really have no idea where to go from here, I've gotten to the point |
From @doyNote that #101640 is a pretty close variant of this bug - that one is |
Migrated from rt.perl.org#49594 (status was 'open')
Searchable as RT49594$
The text was updated successfully, but these errors were encountered: