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
Bad warning about .pm files #5482
Comments
The directory you provide to lib isn’t for Perl modules, and everything under it is counted as part of the same raku distribution. If you insist on this file structure, then provide a META6.json in the lib path as the error suggests |
Note that in the future when rakudo no longer treats .pm files as Raku modules this deprecation message will go away, and things will work the way you want. |
I know. The goal was to use it with |
I would put those modules into a sub directory called p5lib and then just Actually I would do neither and instead declare those modules as dependencies in your META6.json: |
That still triggers the warning Re translation to RPM, interesting idea. Too heavy for my use case though. Even META6.json is a bit heavy... But if it's the common practice in Raku for modules which are not going to be distributed, except that merely pushing the code to github for posterity, to have META6.json file, that should work then. |
This is kind of a recurring topic, I would say, that
For your use case, the former seems more concerning. I remember discussions about the latter more, and with that, the conclusion really seemed to be that it's largely unsalvageable. |
That suggests you are still adding a Raku library path that contains
and used like so: |
Yeah, I didn't have a separate subdir for lib/. But having p5lib in ../ silences it. |
@DarthGandalf what do you think about this issue now? I'm not sure if it's still an issue - at least not the issue that was opened? |
That's up to you. If you wish to close it, or to change the way how it warns, I don't mind either way. |
The Problem
Because the selection of packages at Raku Land is so limited, I wanted to reuse some Perl5 code from CPAN via Inline::Perl5. To avoid polluting system directories, I installed it via
cpanm -L . Foo::Bar
.Expected Behavior
No warning
Actual Behavior
Steps to Reproduce
echo "use lib '.';" > a.raku;
touch B.rakumod
echo "use B;" >> a.raku
mkdir -p c/d/e
touch c/d/e/unrelated.pm
raku a.raku
Note that mere existence of a .pm file shows this warning, even if it's in a deep subdir like
./perl5lib
Environment
rakudo -v
orraku -v
): v2023.10.The text was updated successfully, but these errors were encountered: