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

[UNWANTED BEHAVIOUR] use lib and -I switch can duplicate directories in @*INC #4782

Closed
p6rt opened this issue Nov 23, 2015 · 3 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Nov 23, 2015

Migrated from rt.perl.org#126718 (status was 'rejected')

Searchable as RT126718$

@p6rt
Copy link
Author

p6rt commented Nov 23, 2015

From @zoffixznet

Consider this​:
<Zoffix> m​: use lib 'lib'; use lib 'lib'; use lib 'lib'; say @​*INC.grep(* eq 'file#lib').elems
<camelia> rakudo-moar : OUTPUT«3␤»

Each use lib includes an addition "lib" in @​*INC, despite that directory already being there.

The case is the same for perl6 -Ilib foo-bar.pl where foo-bar.pl has "use lib 'lib';" in the code.

This causes unwanted duplicates that create bugs in code that iterates over @​*INC. It is also conflictory with Perl 5's version of "use lib", whose one of the useful features is specifically that it does NOT cause duplicates in @​INC even if the same directory is "use lib"ed multiple times.

Cheers,
ZZ

@p6rt
Copy link
Author

p6rt commented Dec 7, 2015

From @zoffixznet

No longer relevant since @​*INC is gone.

@p6rt p6rt closed this as completed Dec 7, 2015
@p6rt
Copy link
Author

p6rt commented Dec 7, 2015

@zoffixznet - Status changed from 'new' to 'rejected'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant