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
Proc::Async Example needs to be modified to run on Windows 10 #1453
Comments
|
Is there any other way to do it? These two examples are completely different. In the first one you start a process in a reasonably safe manner, but in your second example you are effectively shelling out. Practically that's |
|
It could state that it directly calls an executable and that It could also tell you how to get around that by shelling out to the command processor A link to |
|
I think that what b2gills is suggesting would be good ... for me, as someone new to Perl that more or less has to use Windows, it was very frustrating to try the example and not have it work. So having it state that it needs to be an executable would be helpful. In addition to that, perhaps it would be good to change the example to something that would work on multiple platforms? Windows has nslookup.exe , maybe something like 'nslookup.exe', '127.0.0.1' would work everywhere? |
|
Having multiple examples, one for windows and one for *nix systems is fine, IMO - For examples that require interaction with the OS, we don't need a single example that works the same everywhere. |
|
Sure, I think that would be fine too ... the big thing is to state that up front in a clear manner. Now I realize that it says "Proc::Async allows you to run external commands asynchronously" but when I was running through things, and things weren't working, I didn't grasp that echo wasn't an external command on windows. I have Perl 6 Fundamentals by Lentz and it's not really clear in there, and I have Perl6 at a Glance by Shitov and Proc::Async isn't covered at all in there ... I really did try to understand what was happening, but eventually had to go to ask on the irc channel where I got help. I'm personally struggling quite a bit with Perl 6 and need all the help I can get. |
|
Assigned to @Scimon (can't do it from the pull-down menu since he does not have the commit bit) |
|
I'll fork and take a look this evening. |
I sent you an invite to perl6 org. You can accept it on https://github.com/perl6 and then you'll have direct access to this repo. |
|
Cheers. I shall behave :) |
|
FYI: You do have this kind of "windows problem" in various places or modules, even if the command you want to invoke is not a build-in of the cmd shell. (I've got the feeling that people on windows run into that issue over and over again) |
|
Ping? |
|
Two examples for the two fundamental platform types is okay, I think even a big fat disclaimer about process calls being heavily platform-dependent would do. Honestly, picking up the burden of explaining platform-specific things about various shell interfaces for different OSes seems above the paycheck of Raku documentation. |
On page: https://docs.perl6.org/type/Proc::Async
The first example:
Will not run properly on Windows. Apparently this is because in Windows, echo is a function of the executable cmd.exe.
So, to make this work on Windows, one has to change the line:
to:
Then it will run properly.
It would be great if the example could be updated to mention this
The text was updated successfully, but these errors were encountered: