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

Diff for /trango/Net-Telnet-Trango/lib/Net/Telnet/Trango.pm between version 1.40 and 1.42

version 1.40, 2007/02/06 21:15:28 version 1.42, 2007/05/21 21:24:13
Line 1 
Line 1 
 package Net::Telnet::Trango;  package Net::Telnet::Trango;
   
 # $RedRiver: Trango.pm,v 1.39 2007/02/06 20:41:42 andrew Exp $  # $RedRiver: Trango.pm,v 1.41 2007/02/07 20:08:32 andrew Exp $
 use strict;  use strict;
 use warnings;  use warnings;
 use base 'Net::Telnet';  use base 'Net::Telnet';
Line 17 
Line 17 
   use Net::Telnet::Trango;    use Net::Telnet::Trango;
   my $t = new Net::Telnet::Trango ( Timeout => 5 );    my $t = new Net::Telnet::Trango ( Timeout => 5 );
   
   $t->open( Host => $fox ) or die "Error connecting: $!";    $t->open( Host => $ap ) or die "Error connecting: $!";
   
   $t->login('password') or die "Couldn't log in: $!";    $t->login('password') or die "Couldn't log in: $!";
   
Line 28 
Line 28 
   
 =head1 DESCRIPTION  =head1 DESCRIPTION
   
 Perl access to the telnet interface on Trango Foxes, SUs and APs.  Perl access to the telnet interface on Trango APs and SUs.
   
 Another handy feature is that it will parse the output from certain  A handy feature is that it will parse the output from certain commands that is
 commands that is in the format "[key1] value1 [key2] value2" and put  in the format "[key1] value1 [key2] value2" and put those in a hashref that is
 those in a hashref that is returned.  This makes using the output from  returned.  This makes using the output from things like sysinfo very easy to
 things like sysinfo very easy to do.  do.
   
 =head2 EXPORT  =head2 EXPORT
   
Line 913 
Line 913 
         }          }
         elsif ( $cfg{'decode'} eq 'maclist' ) {          elsif ( $cfg{'decode'} eq 'maclist' ) {
             $vals = _decode_maclist(@lines);              $vals = _decode_maclist(@lines);
               if (! $vals) {
                   $self->last_error("Error decoding maclist");
               }
         }          }
         else {          else {
             $vals = _decode_lines(@lines);              $vals = _decode_lines(@lines);
Line 943 
Line 946 
             $err = _decode_lines(@lines);              $err = _decode_lines(@lines);
         }          }
   
         if (ref $err eq 'HASH' && $err ->{ERR}) {          if (ref $err eq 'HASH' && $err->{ERR}) {
             $self->last_error($err->{ERR} );              $self->last_error($err->{ERR} );
         } else {          } else {
             $self->last_error("Error with command ($cfg{'String'}): $last");              $self->last_error("Error with command ($cmd{'String'}): $last");
         }          }
         return;          return;
     }      }
Line 1135 
Line 1138 
         return \@decoded;          return \@decoded;
     }      }
     else {      else {
   
         # XXX we should have a way to set last error, not sure why we don't  
         return;          return;
     }      }
 }  }

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.42

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