blib/lib/ExtUtils/XSpp/Node/File.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 3 / 3 totaltotal 100% 24 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/ExtUtils/XSpp/Node/Comment.pm ↑ Summary blib/lib/ExtUtils/XSpp/Node/PercAny.pm »
1 package ExtUtils::XSpp::Node::File;
2 21 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 21 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 21 ▶use base 'ExtUtils::XSpp::Node';
Subroutine BEGIN: called CC=1 SCAR=0.0
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<ExtUtils::XSpp::Node> 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<ExtUtils::XSpp::Node::File>.
28  
29 Named parameters: C<file>, the path to the file
30 that should be written to (or '-').
31  
32 =cut
33  
34 8 ▶sub init {
Subroutine init: called CC=1 SCAR=0.0
Pod documented
35 8 my $this = shift;
36 8 my %args = @_;
37  
38 8 $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 ▶sub file { $_[0]->{FILE} }
Subroutine file: called CC=1 SCAR=0.0
Pod documented
50 8 ▶sub print { return '' }
Subroutine print: called CC=1 SCAR=0.0
Pod documented
51  
52 21 1;
« blib/lib/ExtUtils/XSpp/Node/Comment.pm ↑ Summary blib/lib/ExtUtils/XSpp/Node/PercAny.pm »