"Fossies" - the Fresh Open Source Software Archive 
Member "automake-1.16.3/lib/Automake/RuleDef.pm" (19 Nov 2020, 2288 Bytes) of package /linux/misc/automake-1.16.3.tar.xz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "RuleDef.pm" see the
Fossies "Dox" file reference documentation and the latest
Fossies "Diffs" side-by-side code changes report:
1.16.2_vs_1.16.3.
1 # Copyright (C) 2003-2020 Free Software Foundation, Inc.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2, or (at your option)
6 # any later version.
7
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <https://www.gnu.org/licenses/>.
15
16 package Automake::RuleDef;
17
18 use 5.006;
19 use strict;
20 use warnings FATAL => 'all';
21
22 use Carp;
23 use Exporter;
24
25 use Automake::ChannelDefs;
26 use Automake::ItemDef;
27
28 our @ISA = qw (Automake::ItemDef Exporter);
29 our @EXPORT = qw (&RULE_AUTOMAKE &RULE_USER);
30
31 =head1 NAME
32
33 Automake::RuleDef - a class for rule definitions
34
35 =head1 SYNOPSIS
36
37 use Automake::RuleDef;
38 use Automake::Location;
39
40 =head1 DESCRIPTION
41
42 This class gathers data related to one Makefile-rule definition.
43 It shouldn't be needed outside of F<Rule.pm>.
44
45 =head2 Constants
46
47 =over 4
48
49 =item C<RULE_AUTOMAKE>, C<RULE_USER>
50
51 Possible owners for rules.
52
53 =cut
54
55 use constant RULE_AUTOMAKE => 0; # Rule defined by Automake.
56 use constant RULE_USER => 1; # Rule defined in the user's Makefile.am.
57
58 =back
59
60 =head2 Methods
61
62 =over 4
63
64 =item C<new Automake::RuleDef ($name, $comment, $location, $owner, $source)>
65
66 Create a new rule definition with target C<$name>, with associated comment
67 C<$comment>, Location C<$location> and owner C<$owner>, defined in file
68 C<$source>.
69
70 =cut
71
72 sub new ($$$$$)
73 {
74 my ($class, $name, $comment, $location, $owner, $source) = @_;
75
76 my $self = Automake::ItemDef::new ($class, $comment, $location, $owner);
77 $self->{'source'} = $source;
78 $self->{'name'} = $name;
79 return $self;
80 }
81
82 =item C<$source = $rule-E<gt>source>
83
84 Return the source of the rule.
85
86 =cut
87
88 sub source ($)
89 {
90 my ($self) = @_;
91 return $self->{'source'};
92 }
93
94 =item C<$name = $rule-E<gt>name>
95
96 Return the name of the rule.
97
98 =cut
99
100 sub name ($)
101 {
102 my ($self) = @_;
103 return $self->{'name'};
104 }
105
106 =back
107
108 =head1 SEE ALSO
109
110 L<Automake::Rule>, L<Automake::ItemDef>.
111
112 =cut
113
114 1;