Authen-Krb5-KDB

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN


For example:

    perl Makefile.PL KDB5_UTIL_PATH=/usr/local/krb5/sbin

EOP

# Add constant definition to Makefile for our path
sub MY::constants {
    package MY;
    my $inherited = shift->SUPER::constants(@_);

    # Define additional constant
    $inherited .= "\nKDB5_UTIL_PATH = $kdb5_util_path\n";

    $inherited;
}

# We need our PL script to be given the above constant as an argument
sub MY::processPL {
    package MY;
    my $inherited = shift->SUPER::processPL(@_);

    # Add Makefile as a dependancy of KDB.pm
    $inherited =~ s{(^KDB.pm\s*::)\s*}
                   {$1 Makefile }m
	or die "Error: no target for KDB.pm in: $inherited";
    
    # Pass an extra argument to KDB_pm.PL.
    $inherited =~ s{(^\s+\$\(PERL(?:RUNINST)?\).*KDB_pm.PL\b)}
                   {$1 KDB5_UTIL_PATH=\$\(KDB5_UTIL_PATH\)}m
	or die "Error: no call to KDB_pm.PL in: $inherited";



( run in 0.310 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )