line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ExtUtils::XSpp::Node::Module; |
2
|
21
|
|
|
21
|
|
111
|
use strict; |
|
21
|
|
|
|
|
41
|
|
|
21
|
|
|
|
|
774
|
|
3
|
21
|
|
|
21
|
|
111
|
use warnings; |
|
21
|
|
|
|
|
41
|
|
|
21
|
|
|
|
|
583
|
|
4
|
21
|
|
|
21
|
|
113
|
use base 'ExtUtils::XSpp::Node'; |
|
21
|
|
|
|
|
85
|
|
|
21
|
|
|
|
|
822
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
ExtUtils::XSpp::Node::Module - Node representing an XS++/XS MODULE declaration |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 DESCRIPTION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
An L subclass representing a module declaration. |
13
|
|
|
|
|
|
|
For example, this XS++ |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
%module{Some::Perl::Namespace} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
would turn into this XS: |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
MODULE=Some::Perl::Namespace |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
See also: L. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
In a nutshell, the module that your XS++/XS code belongs to is |
24
|
|
|
|
|
|
|
the main Perl package of your wrapper. A single module can (and usually does) |
25
|
|
|
|
|
|
|
have several packages (respectively C++ classes). |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 METHODS |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 new |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Creates a new C. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Named parameters: C indicating the name |
34
|
|
|
|
|
|
|
of the module. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub init { |
39
|
82
|
|
|
82
|
1
|
157
|
my $this = shift; |
40
|
82
|
|
|
|
|
297
|
my %args = @_; |
41
|
|
|
|
|
|
|
|
42
|
82
|
|
|
|
|
687
|
$this->{MODULE} = $args{module}; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
163
|
|
|
163
|
0
|
514
|
sub to_string { 'MODULE=' . $_[0]->module } |
46
|
|
|
|
|
|
|
|
47
|
82
|
|
|
82
|
1
|
412
|
sub print { return $_[0]->to_string . "\n" } |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 ACCESSORS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 module |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Returns the name of the module. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |
56
|
|
|
|
|
|
|
|
57
|
163
|
|
|
163
|
1
|
1162
|
sub module { $_[0]->{MODULE} } |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |