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

version 1.2, 2007/02/05 19:21:02 version 1.3, 2007/02/05 19:39:33
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.2 2007/02/05 19:21:02 andrew Exp $
   
 my $cfg_file = File::Spec->catfile('t', 'do_network.tests');  my $cfg_file = File::Spec->catfile('t', 'do_network.tests');
   
Line 16 
Line 17 
     add_to_cleanup      => [ 'Net-Telnet-Trango-*', $cfg_file ],      add_to_cleanup      => [ 'Net-Telnet-Trango-*', $cfg_file ],
 );  );
   
 get_config();  my %cfg;
   get_ap_config(\%cfg);
   
   if (%cfg && open T,">$cfg_file") {
       while (my ($key, $value) = each %cfg) {
           print T $key, "\t", $value,"\n";
       }
       close T;
   }
   
 $builder->create_build_script();  $builder->create_build_script();
   
 sub get_config  sub get_ap_config
 {  {
     my %cfg;      my $cfg = shift;
   
     print <<EOB;      print <<EOB;
   
 Net::Telnet::Trango needs to log into an AP to  Net::Telnet::Trango needs to log into an AP to
 perform it\'s full suite of tests. To log in, we  perform it\'s full suite of tests. To log in, we
 need a test AP, a login, a password.  need a test AP and a password.
   
 To skip these tests, hit "return".  To skip these tests, hit "return".
   
 EOB  EOB
   
     $cfg{AP}       = $builder->prompt("AP: ", $cfg{AP}) || return;      $cfg->{AP}       = $builder->prompt("AP: ", $cfg->{AP}) || return;
     $cfg{PASSWD}   = $builder->prompt("Password:", $cfg{PASSWD}) || return;      $cfg->{PASSWD}   = $builder->prompt("Password:", $cfg->{PASSWD}) || return;
   
     if (open T,">$cfg_file") {  
         while (my ($key, $value) = each %cfg) {  
             print T $key, "\t", $value,"\n";  
         }  
         close T;  
     }  
 }  }

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

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