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
blead perl breaks CPANPLUS-0.055 and other programs that push @ISA, __PACKAGE__ #7999
Comments
From david.dyck@fluke.comCreated by david.dyck@fluke.comWhile trying to build I got the followin error when processing The following 3 line test program results in the same error when pushing __PACKAGE__ "Modification of a read-only value attempted at isabug.pl line 3." Renaming the @ISA variable makes the error message go away. Perl Info
|
From david.dyck@fluke.com
if I change the line then the error message is also supressed! At best the error message is confusing, as it seems that anyone have any ideas what is really going on? |
From @demerphqOn 6/30/05, David Dyck <david.dyck@fluke.com> wrote:
Why would you do this anyway? What is the point of a package being ISA itself? -- |
The RT System itself - Status changed from 'new' to 'open' |
From @schwernOn Thu, Jun 30, 2005 at 10:02:27AM +0200, demerphq wrote:
Other way around. push @Some::Other::Package::ISA, __PACKAGE__; Term::UI does this. push @Term::ReadLine::Stub::ISA, __PACKAGE__ -- |
From @rgsDavid Dyck (via RT) wrote:
I can reproduce this with other magic variables as well : $ ./perl -e '%ENV = (PATH => __PACKAGE__)' The patch below solves this immediate problem with @ISA (similar fix Index: sv.c--- sv.c (révision 5317) |
From david.dyck@fluke.comOn Thu, 30 Jun 2005 at 15:51 +0200, Rafael Garcia-Suarez wrote:
Thanks for the patch. Before I applied the patch, I tried another experiment $ cat isabug.pl $ perl -MO=Deparse isabug.pl |
From david.dyck@fluke.comOn Thu, 30 Jun 2005 at 08:09 -0000, Michael G Schwern via RT...:
Michael points to the very line that highlighted the problem, as |
From @rgsDavid Dyck wrote:
Because __PACKAGE__ is a constant. Use Devel::Peek to peek at it. |
From david.dyck@fluke.comOn Thu, 30 Jun 2005 at 16:42 +0200, Rafael Garcia-Suarez <rgarciasuarez@man...:
Thanks for the pointer to Devel::Peek, I don't use it enough... $ perl -e 'use Devel::Peek; Dump( __PACKAGE__);' $ perl -e 'use Devel::Peek; Dump( 'main' );' I guess __PACKAGE__ is one of those constants that O::Deparse |
From @JohnPeacockDavid Dyck wrote:
There's nothing to regenerate; the tokenizer has already eaten the ...toke.c:4350 or so...
John p.s. is this _really_ necessary:
i.e. isn't strEQ going to shortcircuit just as fast as individual char -- |
From @iabynOn Thu, Jun 30, 2005 at 11:43:33AM -0400, John Peacock wrote:
and indeed the breakage in bleed occurs there: the SV attached to -- |
From @rgsDave Mitchell wrote:
Right. And I don't really see a good way to fix it for now, except For the record, here's a regression test : Index: t/op/magic.t--- t/op/magic.t (révision 5317) -print "1..54\n";
|
From @ysthOn Thu, Jun 30, 2005 at 11:43:33AM -0400, John Peacock wrote:
That code is autogenerated; deciding when having perl_keywords.pl use |
From @JohnPeacockYitzchak Scott-Thoennes wrote:
OK, that makes sense. I thought someone went through the trouble to But as you said, it probably isn't worth the trouble (premature John -- |
From @schwernOn Thu, Jun 30, 2005 at 11:43:33AM -0400, John Peacock wrote:
Kinda makes me think of those tall, vertical neon signs outside hotels where -- |
From @nwc10On Thu, Jun 30, 2005 at 11:43:33AM -0400, John Peacock wrote:
We benchmarked it and the code generated by the current perl_keyword.pl was Nicholas Clark |
From @JohnPeacockNicholas Clark wrote:
No, I believe you that it is faster (if only because it saves a function John -- |
From @iabynOn Thu, Jun 30, 2005 at 06:25:20PM +0200, Rafael Garcia-Suarez wrote:
Looking at it further: I think its kosher for __PACKAGE__ to return a $ ./perl -e '%h=qw(main,1); push @ISA, (keys %h)[0]' The big difference between maint and bleed isn't so much that Later, in sv_magic() when attempting to attach magic, (assuming it's one $ ./perl -Ilib -MDevel::Peek -e '$x=__PACKAGE__; Dump $x; $x =~ /m/g; Dump $x' Notice that it's the same SV, but SvPVX has changed. My provisional feeling is the correct fix is to expand the list of magics ... Thinking further, rather than allowing lots of extra magics, just Seems to work... Change 25032 by davem@davem-splatty on 2005/06/30 22:41:07 [perl #36434] assigning shared consts (eg __PACKAGE__) to magic vars Affected files ... ... //depot/perl/sv.c#940 edit Differences ... ==== //depot/perl/sv.c#940 (text) ==== @@ -4984,7 +4984,12 @@ ==== //depot/perl/t/op/magic.t#77 (xtext) ==== @@ -36,7 +36,7 @@ -print "1..56\n";
-- |
@rgs - Status changed from 'open' to 'resolved' |
From @rgsDave Mitchell wrote:
Since a copy takes place, sounds OK to me. -- |
Migrated from rt.perl.org#36434 (status was 'resolved')
Searchable as RT36434$
The text was updated successfully, but these errors were encountered: