File: Base.pm

package info (click to toggle)
libmakefile-parser-perl 0.211-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 560 kB
  • ctags: 556
  • sloc: perl: 7,028; makefile: 263
file content (22 lines) | stat: -rw-r--r-- 375 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package Makefile::AST::Rule::Base;

use strict;
use warnings;
use base 'Class::Accessor::Fast';

__PACKAGE__->mk_ro_accessors(qw{
    normal_prereqs order_prereqs commands colon
    target
});

sub add_command ($$) {
    my ($self, $cmd) = @_;
    push @{ $self->{commands} }, $cmd;
}

sub has_command ($) {
    my ($self) = @_;
    return scalar @{ $self->commands };
}

1;