Skip to content

Commit

Permalink
Remove "use cur"
Browse files Browse the repository at this point in the history
Now that the curli branch has been merged, this now *really* has become
a fossil
  • Loading branch information
lizmat committed Nov 29, 2015
1 parent dbfb5e2 commit af4d62e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 69 deletions.
29 changes: 0 additions & 29 deletions src/Perl6/World.nqp
Expand Up @@ -678,32 +678,6 @@ class Perl6::World is HLL::World {
}
}

method use_lib($arglist,:$push) {
my $INC := %*PRAGMAS<INC> := %*PRAGMAS<INC>
?? nqp::clone(%*PRAGMAS<INC>)
!! nqp::list();

my $DEBUG := self.RAKUDO_MODULE_DEBUG;
$DEBUG(($push ?? "Push" !! "Unshift") ~ "ing to @?INC:") if $DEBUG;

for $arglist -> $arg {
my $string := nqp::decont(nqp::index($arg,'#') == -1
?? nqp::hllizefor("file#$arg", 'perl6')
!! $arg
);
$push
?? nqp::push($INC,$string)
!! nqp::unshift($INC,$string);
$DEBUG(" $arg") if $DEBUG;
}

my $INC-list := nqp::create(self.find_symbol(['List']));
nqp::bindattr($INC-list, self.find_symbol(['List']), '$!reified', $INC);
$INC := $INC-list;
self.add_object($INC);
self.install_lexical_symbol(self.cur_lexpad,'@?INC',$INC);
}

# pragmas without args
my %no_args_pragma := nqp::hash(
'fatal', 1,
Expand Down Expand Up @@ -753,9 +727,6 @@ class Perl6::World is HLL::World {
if %just_set_pragma{$name} {
%*PRAGMAS{$name} := $on;
}
elsif $name eq 'cur' { # temporary, will become 'lib'
self.use_lib($arglist);
}
elsif $name eq 'strict' {
if nqp::islist($arglist) {
self.throw($/, 'X::Pragma::NoArgs', :$name)
Expand Down
2 changes: 1 addition & 1 deletion src/core/Str.pm
Expand Up @@ -1174,7 +1174,7 @@ my class Str does Stringy { # declared in BOOTSTRAP

method samespace(Str:D: Str:D $pat) {
my @self-chunks = self.split(rx/\s+/, :v).flat;
my @pat-chunks = $pat.split(rx/\s+/, :v).flat;
my @pat-chunks = $pat.words;
loop (my $i = 1; $i < @pat-chunks && $i < @self-chunks; $i += 2) {
@self-chunks[$i] = @pat-chunks[$i];
}
Expand Down
39 changes: 0 additions & 39 deletions t/01-sanity/54-use-lib.t

This file was deleted.

0 comments on commit af4d62e

Please sign in to comment.