Skip to content

Commit

Permalink
Remove useless and actually harmful 'use lib' statements from modules.
Browse files Browse the repository at this point in the history
There's no need to use lib 't/spec/packages' in a module that _is_ loaded
from that path already. If t/spec/packages was not in the repo list, we could
not have loaded the modules in the first place.

It's actually harmful as we don't allow a "use lib" in a precompiled module.
This only made it into 6.c as other restrictions prevented us from
precompiling these modules but those restrictions were an implementation
detail, not necessitated by the language design.
  • Loading branch information
niner committed Jul 16, 2016
1 parent 77efe8e commit 32fd216
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion packages/A.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use v6.c;

use lib 't/spec/packages';
use B;
class A {
has B $.x;
Expand Down
2 changes: 0 additions & 2 deletions packages/A/A.pm
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use v6.c;
# used in t/spec/S11-modules/nested.t

use lib 't/spec/packages';

module A::A {
use A::B;
}
Expand Down
2 changes: 0 additions & 2 deletions packages/B.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use v6.c;

use lib 't/spec/packages';

use B::Grammar;

class B {
Expand Down
1 change: 0 additions & 1 deletion packages/RoleA.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use v6.c;
use lib 't/spec/packages';
use RoleB;

unit role RoleA;
Expand Down

0 comments on commit 32fd216

Please sign in to comment.