[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.2

1.1       andrew      1: use strict;
                      2: use warnings;
                      3: use Module::Build;
1.2     ! andrew      4: # $RedRiver: Build.PL,v 1.1 2007/02/05 18:10:55 andrew Exp $
        !             5:
        !             6: my $cfg_file = File::Spec->catfile('t', 'do_network.tests');
1.1       andrew      7:
                      8: my $builder = Module::Build->new(
                      9:     module_name         => 'Net::Telnet::Trango',
                     10:     license             => 'perl',
                     11:     dist_author         => 'Andrew Fresh <andrew@cpan.org>',
                     12:     dist_version_from   => 'lib/Net/Telnet/Trango.pm',
                     13:     build_requires => {
                     14:         'Test::More' => 0,
                     15:     },
1.2     ! andrew     16:     add_to_cleanup      => [ 'Net-Telnet-Trango-*', $cfg_file ],
1.1       andrew     17: );
                     18:
1.2     ! andrew     19: get_config();
        !            20:
1.1       andrew     21: $builder->create_build_script();
1.2     ! andrew     22:
        !            23: sub get_config
        !            24: {
        !            25:     my %cfg;
        !            26:     print <<EOB;
        !            27:
        !            28: Net::Telnet::Trango needs to log into an AP to
        !            29: perform it\'s full suite of tests. To log in, we
        !            30: need a test AP, a login, a password.
        !            31:
        !            32: To skip these tests, hit "return".
        !            33:
        !            34: EOB
        !            35:
        !            36:     $cfg{AP}       = $builder->prompt("AP: ", $cfg{AP}) || return;
        !            37:     $cfg{PASSWD}   = $builder->prompt("Password:", $cfg{PASSWD}) || return;
        !            38:
        !            39:     if (open T,">$cfg_file") {
        !            40:         while (my ($key, $value) = each %cfg) {
        !            41:             print T $key, "\t", $value,"\n";
        !            42:         }
        !            43:         close T;
        !            44:     }
        !            45: }

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