summaryrefslogtreecommitdiffstats
path: root/lib/ExtUtils/MakeMaker/Dist/Zilla.pm
blob: 25f46cb157e0ff41e6fc81a1ae6fb92dee0fd244 (plain) (blame)
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
package ExtUtils::MakeMaker::Dist::Zilla;
use strict;
use warnings;

use ExtUtils::MakeMaker ();

sub import {
    warn <<'EOF';

  ********************************* WARNING **********************************

  This module uses Dist::Zilla for development. This Makefile.PL will let you
  run the tests, but you are encouraged to install Dist::Zilla and the needed
  plugins if you intend on doing any serious hacking.

  ****************************************************************************

EOF

    ExtUtils::MakeMaker->export_to_level(1, @_);
}

{
    package MY;

    use Config;

    my $message;
    BEGIN {
        $message = <<'MESSAGE';

  ********************************* ERROR ************************************

  This module uses Dist::Zilla for development. This Makefile.PL will let you
  run the tests, but should not be used for installation or building dists.
  Building a dist should be done with 'dzil build', installation should be
  done with 'dzil install', and releasing should be done with 'dzil release'.

  ****************************************************************************

MESSAGE
        $message =~ s/^(.*)$/\t\$(NOECHO) echo "$1";/mg;
    }

    sub install {
        return <<EOF;
install:
$message
	\$(NOECHO) echo "Running dzil install for you...";
	\$(NOECHO) dzil install
EOF
    }

    sub dist_core {
        return <<EOF;
dist:
$message
	\$(NOECHO) echo "Running dzil build for you...";
	\$(NOECHO) dzil build
EOF
    }
}

1;