Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 53 lines (33 sloc) 1.569 kB
5b9746a Wrote this a few days ago, but forgot to svn add.
wayland authored
1
2 =encoding utf8
3
4 =head1 Title
5
6 DRAFT: Synopsis 21: Calling Foreign Code
7
8 =head1 Version
9
10 Author: Tim Nelson <wayland@wayland.id.au>
11 Maintainer: Larry Wall <larry@wall.org>
12 Contributions: Tim Nelson <wayland@wayland.id.au>
13 Larry Wall <larry@wall.org>
14 Date: 27 Feb 2009
15 Last Modified: 27 Feb 2009
16 Version: 1
17
18 The document is a draft.
19
20 If you read the HTML version, it is generated from the pod in the pugs
21 repository under /docs/Perl6/Spec/S21-calling-foreign-code.pod so edit it there in
22 the SVN repository if you would like to make changes.
23
24 =head1 Overview
25
26 Unfortunately, calling foreign code properly is quite platform dependent. This means that
27 parts of the external calling conventions can't be standardised. But the parts that can
28 be standardised are specified here.
29
30 =head1 Specification
31
32 The C<use> statement allows an external language to be specified in
33 addition to (or instead of) an authority, so that you can use modules
34 from other languages. The C<from> adverb also parses any additional
35 parts as short-form arguments. For instance:
36
37 use Whiteness:from<perl5>:name<Acme::Bleach>:ver<1.12>:auth<cpan:DCONWAY>;
38 use Whiteness:from<perl5 Acme::Bleach 1.12 cpan:DCONWAY>; # same thing
39
40 use libc:from<C>;
41
42 =head1 Other Considerations
43
44 =head2 Linking to common platforms
45
46 XXX We need a discussion of how to link to some of the common platforms
47
48 =head1 Additions
49
50 Please post errors and feedback to perl6-language. If you are making
51 a general laundry list, please separate messages by topic.
52
Something went wrong with that request. Please try again.