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

link and symlink not documented but... may be implemented? #98

Closed
dha opened this issue Jun 26, 2015 · 3 comments
Closed

link and symlink not documented but... may be implemented? #98

dha opened this issue Jun 26, 2015 · 3 comments
Labels
docs Documentation issue (primary issue type)

Comments

@dha
Copy link
Contributor

dha commented Jun 26, 2015

When I try to use the link() function, I get an error I didn't expect:

~/rakudostar/rakudo 18:52:05% ./perl6 -e 'link("testfile.p6", "tfile.p6");'
Failed to create link called 'tfile.p6' on target '/Users/dha/rakudostar/rakudo/testfile.p6': Failed to link file: no such file or directory
in any at ././CORE.setting.moarvm:1
in block at -e:1

I would have expected it to tell me it didn't recognize the function, as these aren't documented. Is it implemented? And if it is, it probably should be documented. Similarly for symlink().

Odd that it's not finding the file, though...

@jonathanstowe
Copy link
Contributor

There are quite a few of the IO Operators that aren't documented properly. But it definitely works, I think the arguments are a different way round than you think they are:

[jonathan@coriolanus Audio-Libshout]$ perl6 -e 'link("ff", "gg")'
Failed to create link called 'gg' on target '/home/jonathan/devel/perl6/Audio-Libshout/ff': Failed to link file: file already exists
in any at /home/jonathan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
in block at -e:1

[jonathan@coriolanus Audio-Libshout]$ rm gg
[jonathan@coriolanus Audio-Libshout]$ perl6 -e 'link("ff", "gg")'
Failed to create link called 'gg' on target '/home/jonathan/devel/perl6/Audio-Libshout/ff': Failed to link file: no such file or directory
in any at /home/jonathan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
in block at -e:1

[jonathan@coriolanus Audio-Libshout]$ perl6 -e 'link( "gg", "ff")'
[jonathan@coriolanus Audio-Libshout]$ ls -al gg
-rw-rw-r--. 2 jonathan jonathan 0 Jun 27 07:21 gg

(That is link($target, $source) ...)

It is implemented as $target.IO.link($source).

@jonathanstowe
Copy link
Contributor

Added as 5e2a992

@dha
Copy link
Contributor Author

dha commented Jun 28, 2015

On Fri, Jun 26, 2015 at 11:28:20PM -0700, Jonathan Stowe wrote:

There are quite a few of the IO Operators that aren't documented properly. But it definitely works, I think the arguments are a different way round than you think they are:

[jonathan@coriolanus Audio-Libshout]$ perl6 -e 'link("ff", "gg")'
Failed to create link called 'gg' on target '/home/jonathan/devel/perl6/Audio-Libshout/ff': Failed to link file: file already exists
in any at /home/jonathan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
in block at -e:1

[jonathan@coriolanus Audio-Libshout]$ rm gg
[jonathan@coriolanus Audio-Libshout]$ perl6 -e 'link("ff", "gg")'
Failed to create link called 'gg' on target '/home/jonathan/devel/perl6/Audio-Libshout/ff': Failed to link file: no such file or directory
in any at /home/jonathan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
in block at -e:1

[jonathan@coriolanus Audio-Libshout]$ perl6 -e 'link( "gg", "ff")'
[jonathan@coriolanus Audio-Libshout]$ ls -al gg
-rw-rw-r--. 2 jonathan jonathan 0 Jun 27 07:21 gg

(That is link($target, $source) ...)

Which is backwards, apparently, from the Perl 5 version. Important to
know. Thanks.

dha

David H. Adler - dha@panix.com - http://www.panix.com/~dha/
It's just jokes, man.
- Aaron McGruder

@moritz moritz closed this as completed Jul 11, 2015
@AlexDaniel AlexDaniel added the docs Documentation issue (primary issue type) label Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation issue (primary issue type)
Projects
None yet
Development

No branches or pull requests

4 participants