Skip to content
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

@*INC isn't writable in Rakudo #1865

Closed
p6rt opened this issue Jun 22, 2010 · 6 comments
Closed

@*INC isn't writable in Rakudo #1865

p6rt opened this issue Jun 22, 2010 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 22, 2010

Migrated from rt.perl.org#75956 (status was 'resolved')

Searchable as RT75956$

@p6rt
Copy link
Author

p6rt commented Jun 22, 2010

From @masak

<masak> rakudo​: @​*INC.=reverse; say @​*INC.perl
<p6eval> rakudo ad2afb​: OUTPUT«Cannot assign to readonly value [...]
<ash_> rakudo​: @​*INC = 1, 2;
<p6eval> rakudo ad2afb​: OUTPUT«Cannot assign to readonly value [...]
<ash_> aww hmm, why is it read only?
<masak> ash_​: yeah, that feels wrong, doesn't it?
<masak> rakudo​: @​*INC.push("OH HAI"); say @​*INC.perl
<p6eval> rakudo ad2afb​: OUTPUT«["lib", "/home/p6eval/.perl6/lib",
"/home/p6eval//p2/lib/parrot/2.5.0-devel/languages/perl6/lib", ".",
"OH HAI"]␤»
<masak> ash_​: only the container is, though.
<ash_> masak​: ah, i guess that makes sense...
<masak> ash_​: not sure it does. but it makes it not-as-bad.
<ash_> masak​: well, is there a good reason to let someone do @​*INC = ?
you lose all of the default load paths if you do that
<moritz_> ash_​: is there a good reason not to allow it?
<ash_> (how do you even make a container R only?)
<moritz_> in general we allow people to shoot in their foot if that's
what they wish
<ash_> hmm
* masak submits @​*INC rakudobug

@p6rt
Copy link
Author

p6rt commented Jun 27, 2010

From @pmichaud

Now fixed in current Rakudo, assigning to moritz for spectest coverage.

Pm

@p6rt
Copy link
Author

p6rt commented Jun 27, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jun 28, 2010

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S28-named-variables/inc.t

commit 1f6b32e3b9ea370b8f10de64ce8f386f50aa2198
Author​: moritz <moritz@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Mon Jun 28 20​:58​:52 2010 +0000

  [t/spec] tests for RT #​75956, @​*INC should be writable
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;31484 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S28-named-variables/inc.t b/t/spec/S28-named-variables/inc.t
index 4c3d462..449ef02 100644
--- a/t/spec/S28-named-variables/inc.t
+++ b/t/spec/S28-named-variables/inc.t
@@ -2,7 +2,7 @@ use v6;
 
 use Test;
 
-plan 3;
+plan 5;
 
 # Note that @*INC is only provisional until we have plans for a "real"
 # module database in place.
@@ -18,4 +18,7 @@ is(+@*INC, $number_in_inc + 1, 'we added something to @INC');
 pop @*INC;
 is(+@*INC, $number_in_inc, 'we removed something from @INC');
 
+lives_ok { @*INC = <a b c> }, 'Can assign to @*INC';
+is @*INC.join(','), 'a,b,c', '... and assignment worked';
+
 # vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Jun 28, 2010

From @moritz

Covered, resolving

@p6rt
Copy link
Author

p6rt commented Jun 28, 2010

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jun 28, 2010
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant