line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ExtUtils::XSpp::Node::File; |
2
|
21
|
|
|
21
|
|
111
|
use strict; |
|
21
|
|
|
|
|
45
|
|
|
21
|
|
|
|
|
863
|
|
3
|
21
|
|
|
21
|
|
109
|
use warnings; |
|
21
|
|
|
|
|
40
|
|
|
21
|
|
|
|
|
588
|
|
4
|
21
|
|
|
21
|
|
106
|
use base 'ExtUtils::XSpp::Node'; |
|
21
|
|
|
|
|
43
|
|
|
21
|
|
|
|
|
817
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
ExtUtils::XSpp::Node::File - Directive that sets the name of the output file |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 DESCRIPTION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
An L subclass representing a directive to change the |
13
|
|
|
|
|
|
|
name of the output file: |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
%file{file/to/write/to.xs} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
A special case is |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
%file{-} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
which indicates that output should be written to STDOUT. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 METHODS |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head2 new |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Creates a new C. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Named parameters: C, the path to the file |
30
|
|
|
|
|
|
|
that should be written to (or '-'). |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub init { |
35
|
8
|
|
|
8
|
1
|
15
|
my $this = shift; |
36
|
8
|
|
|
|
|
24
|
my %args = @_; |
37
|
|
|
|
|
|
|
|
38
|
8
|
|
|
|
|
44
|
$this->{FILE} = $args{file}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 ACCESSORS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 file |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Returns the path of the file to write to (or C<-> for STDOUT). |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
48
|
|
|
|
|
|
|
|
49
|
8
|
|
|
8
|
1
|
31
|
sub file { $_[0]->{FILE} } |
50
|
8
|
|
|
8
|
1
|
25
|
sub print { return '' } |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |