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

Diff for /trango/Net-Telnet-Trango/Build.PL between version 1.2 and 1.5

version 1.2, 2007/02/05 19:21:02 version 1.5, 2007/02/05 23:10:37
Line 1 
Line 1 
 use strict;  use strict;
 use warnings;  use warnings;
 use Module::Build;  use Module::Build;
 # $RedRiver: Build.PL,v 1.1 2007/02/05 18:10:55 andrew Exp $  use File::Spec;
   # $RedRiver: Build.PL,v 1.4 2007/02/05 21:36:42 andrew Exp $
   
 my $cfg_file = File::Spec->catfile('t', 'do_network.tests');  my $cfg_file = File::Spec->catfile('t', 'tests.cfg');
   
 my $builder = Module::Build->new(  my $builder = Module::Build->new(
     module_name         => 'Net::Telnet::Trango',      module_name         => 'Net::Telnet::Trango',
Line 14 
Line 15 
         'Test::More' => 0,          'Test::More' => 0,
     },      },
     add_to_cleanup      => [ 'Net-Telnet-Trango-*', $cfg_file ],      add_to_cleanup      => [ 'Net-Telnet-Trango-*', $cfg_file ],
       create_makefile_pl  => 'traditional',
       create_readme       => 1,
       create_html         => 1,
       dynamic_config      => 1,
       auto_features       => {
           YAML_support =>
           {
               description => "Use YAML.pm to write META.yml files",
               requires => { YAML => ' >= 0.35, != 0.49_01 ' },
           },
           manpage_support =>
           {
               description => "Create Unix man pages",
               requires => { 'Pod::Man' => 0 },
           },
           HTML_support =>
           {
               description => "Create HTML documentation",
               requires => { 'Pod::Html' => 0 },
           },
       },
 );  );
   
 get_config();  get_config();
   
 $builder->create_build_script();  $builder->create_build_script();
   
 sub get_config  sub get_config {
 {  
     my %cfg;      my %cfg;
     print <<EOB;      print <<EOB;
   
 Net::Telnet::Trango needs to log into an AP to  Net::Telnet::Trango needs some additional information and setup to
 perform it\'s full suite of tests. To log in, we  perform it\'s full suite of tests.
 need a test AP, a login, a password.  
   
   These tests MAY change settings on the units it connects to, so please
   do not use equipment that is in production.
   
 To skip these tests, hit "return".  To skip these tests, hit "return".
   
 EOB  EOB
   
     $cfg{AP}       = $builder->prompt("AP: ", $cfg{AP}) || return;      get_ap_config(\%cfg);
     $cfg{PASSWD}   = $builder->prompt("Password:", $cfg{PASSWD}) || return;  
   
     if (open T,">$cfg_file") {      get_sudb_config(\%cfg) if $cfg{AP} && $cfg{AP_PASSWD};
   
       get_su_config(\%cfg);
   
       if (%cfg && open T,">$cfg_file") {
         while (my ($key, $value) = each %cfg) {          while (my ($key, $value) = each %cfg) {
             print T $key, "\t", $value,"\n";              print T $key, "\t", $value,"\n";
         }          }
         close T;          close T;
     }      }
   
 }  }
   
   sub get_ap_config {
       my $cfg = shift;
   
       print 'To run the AP tests, we need an IP and a password for an AP.', "\n";
   
       $cfg->{AP}        = $builder->prompt("AP IP: ", $cfg->{AP}) || return;
       $cfg->{AP_PASSWD} = $builder->prompt("AP Password:", $cfg->{AP_PASSWD})
         || return;
   }
   
   sub get_sudb_config {
       my $cfg = shift;
   
       print <<EOL;
   To run the SUDB tests, we need an suid and mac address of an
   SU that can reliably link to the AP.
   EOL
   
       $cfg->{SU_ID}  = $builder->prompt("SU ID: ", $cfg->{SU_ID})  || return;
       $cfg->{SU_MAC} = $builder->prompt("SU MAC:", $cfg->{SU_MAC}) || return;
   }
   
   sub get_su_config {
       my $cfg = shift;
   
       print 'To run the SU tests, we need an IP and a password of an SU.', "\n";
   
       $cfg->{SU}        = $builder->prompt("SU IP: ", $cfg->{SU}) || return;
       $cfg->{SU_PASSWD} = $builder->prompt("SU Password:", $cfg->{SU_PASSWD})
         || return;
   }
   

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

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