File: MyModuleBuild.pm

package info (click to toggle)
libparams-validate-perl 1.31-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,360 kB
  • sloc: perl: 2,374; makefile: 3
file content (39 lines) | stat: -rw-r--r-- 741 bytes parent folder | download | duplicates (3)
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
package inc::MyModuleBuild;

use strict;
use warnings;

use Moose;

extends 'Dist::Zilla::Plugin::ModuleBuild';

has '+mb_version' => (
    default => 0.4227,
);

has '+mb_class' => ( default => 'MyMBClass' );

around module_build_args => sub {
    my $orig = shift;
    my $self = shift;

    my $args = $self->$orig(@_);

    $args->{allow_pureperl} = 1;
    $args->{get_options}    = { pp => {} };

    $args->{c_source} = 'c';
    if ( $ENV{TRAVIS} ) {

        # The declaration-after-statement warning is for constructs that break
        # old versions of MSVC.
        $args->{extra_compiler_flags}
            = [ '-Wdeclaration-after-statement', '-Werror' ];
    }

    return $args;
};

__PACKAGE__->meta()->make_immutable();

1;