File: File.pm

package info (click to toggle)
libextutils-xspp-perl 0.1800-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 996 kB
  • ctags: 1,861
  • sloc: perl: 8,324; cpp: 125; makefile: 2
file content (52 lines) | stat: -rw-r--r-- 835 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package ExtUtils::XSpp::Node::File;
use strict;
use warnings;
use base 'ExtUtils::XSpp::Node';

=head1 NAME

ExtUtils::XSpp::Node::File - Directive that sets the name of the output file

=head1 DESCRIPTION

An L<ExtUtils::XSpp::Node> subclass representing a directive to change the
name of the output file:

  %file{file/to/write/to.xs}
  
A special case is

  %file{-}
  
which indicates that output should be written to STDOUT.

=head1 METHODS

=head2 new

Creates a new C<ExtUtils::XSpp::Node::File>.

Named parameters: C<file>, the path to the file
that should be written to (or '-').

=cut

sub init {
  my $this = shift;
  my %args = @_;

  $this->{FILE} = $args{file};
}

=head1 ACCESSORS

=head2 file

Returns the path of the file to write to (or C<-> for STDOUT).

=cut

sub file { $_[0]->{FILE} }
sub print { return '' }

1;