File: 91_inc_sanity_check.pl

package info (click to toggle)
libdbix-class-perl 0.082844-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,320 kB
  • sloc: perl: 27,215; sql: 322; sh: 29; makefile: 16
file content (29 lines) | stat: -rw-r--r-- 835 bytes parent folder | download | duplicates (5)
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
my @files_to_check = qw(AutoInstall.pm Can.pm WriteAll.pm Win32.pm);

END {
  # shit already hit the fan
  return if $?;

  for my $f (@files_to_check) {
    if (! -f "inc/Module/Install/$f") {
      warn "Your inc/ does not contain a critical Module::Install component - \$_. Something went horrifically wrong... please ask the cabal for help\n";
      unlink 'Makefile';
      exit 1;
    }
  }
}

my $oneliner = <<"EOO";
-f qq(\$(DISTVNAME)/inc/Module/Install/\$_) or die "\\nYour \$(DISTVNAME)/inc/ does not contain a critical Module::Install component: \$_. Something went horrifically wrong... please ask the cabal for help\\n\\n" for (qw(@files_to_check))
EOO

postamble <<"EOP";
create_distdir : sanity_check_inc

sanity_check_inc :
\t\$(NOECHO) @{[ $mm_proto->oneliner($oneliner) ]}

EOP

# keep the Makefile.PL eval happy
1;