[BACK]Return to Build.PL CVS log [TXT][DIR] Up to [local] / trango / Net-Telnet-Trango

Annotation of trango/Net-Telnet-Trango/Build.PL, Revision 1.4

1.1       andrew      1: use strict;
                      2: use warnings;
                      3: use Module::Build;
1.3       andrew      4: use File::Spec;
1.4     ! andrew      5: # $RedRiver: Build.PL,v 1.3 2007/02/05 19:39:33 andrew Exp $
1.2       andrew      6:
1.4     ! andrew      7: my $cfg_file = File::Spec->catfile('t', 'tests.cfg');
1.1       andrew      8:
                      9: my $builder = Module::Build->new(
                     10:     module_name         => 'Net::Telnet::Trango',
                     11:     license             => 'perl',
                     12:     dist_author         => 'Andrew Fresh <andrew@cpan.org>',
                     13:     dist_version_from   => 'lib/Net/Telnet/Trango.pm',
                     14:     build_requires => {
                     15:         'Test::More' => 0,
                     16:     },
1.2       andrew     17:     add_to_cleanup      => [ 'Net-Telnet-Trango-*', $cfg_file ],
1.4     ! andrew     18:     create_makefile_pl  => 'traditional',
        !            19:     create_readme       => 1,
        !            20:     create_html         => 1,
        !            21:     dynamic_config      => 1,
        !            22:     auto_features       => {
        !            23:         YAML_support =>
        !            24:         {
        !            25:             description => "Use YAML.pm to write META.yml files",
        !            26:             requires => { YAML => ' >= 0.35, != 0.49_01 ' },
        !            27:         },
        !            28:         manpage_support =>
        !            29:         {
        !            30:             description => "Create Unix man pages",
        !            31:             requires => { 'Pod::Man' => 0 },
        !            32:         },
        !            33:         HTML_support =>
        !            34:         {
        !            35:             description => "Create HTML documentation",
        !            36:             requires => { 'Pod::Html' => 0 },
        !            37:         },
        !            38:     },
1.1       andrew     39: );
                     40:
1.3       andrew     41: my %cfg;
                     42: get_ap_config(\%cfg);
                     43:
                     44: if (%cfg && open T,">$cfg_file") {
                     45:     while (my ($key, $value) = each %cfg) {
                     46:         print T $key, "\t", $value,"\n";
                     47:     }
                     48:     close T;
                     49: }
1.2       andrew     50:
1.1       andrew     51: $builder->create_build_script();
1.2       andrew     52:
1.3       andrew     53: sub get_ap_config
1.2       andrew     54: {
1.3       andrew     55:     my $cfg = shift;
                     56:
1.2       andrew     57:     print <<EOB;
                     58:
                     59: Net::Telnet::Trango needs to log into an AP to
                     60: perform it\'s full suite of tests. To log in, we
1.3       andrew     61: need a test AP and a password.
1.2       andrew     62:
                     63: To skip these tests, hit "return".
                     64:
                     65: EOB
                     66:
1.4     ! andrew     67:     $cfg->{AP}        = $builder->prompt("AP: ", $cfg->{AP}) || return;
        !            68:     $cfg->{AP_PASSWD} = $builder->prompt("Password:", $cfg->{AP_PASSWD}) || return;
1.2       andrew     69: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>