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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
package ExtUtils::Builder::Action::Perl;
$ExtUtils::Builder::Action::Perl::VERSION = '0.020';
use strict;
use warnings;
use parent 'ExtUtils::Builder::Action::Primitive';
sub _preference_map {
return {
execute => 3,
code => 2,
command => 1,
flatten => 0,
};
}
sub message {
my $self = shift;
return $self->{message};
}
sub to_code_hash {
my ($self, %opts) = @_;
my %result = (
modules => [ $self->modules ],
code => $self->to_code(skip_loading => 1, %opts),
);
$result{message} = $self->{message} if defined $self->{message};
return \%result;
}
1;
# ABSTRACT: A base-role for Code actions
__END__
=pod
=encoding UTF-8
=head1 NAME
ExtUtils::Builder::Action::Perl - A base-role for Code actions
=head1 VERSION
version 0.020
=head1 DESCRIPTION
This class provides most functionality of Code Actions.
=head1 ATTRIBUTES
=head2 message
This is a message that will be logged during execution. This attribute is optional.
=head1 METHODS
=head2 modules
This will return the modules needed for this action.
=for Pod::Coverage execute
to_command
preference
=head1 AUTHOR
Leon Timmermans <fawaka@gmail.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
|