AHA

 view release on metacpan or  search on metacpan

lib/AHA.pm  view on Meta::CPAN

58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
it is a plug like the Dect!200)
 
=back
 
=head1 METHODS
 
Many methods of this class take an 8-digit AIN (actor id) or a symbolic name as
argument. This symbolic name can be configured in the admin UI of the Fritz
Box.
 
If the argument (name or AIN) is not known, an error is raised (die). The same
is true, if authorization fails.
 
=over
 
=cut
 
package AHA;
 
use strict;

lib/AHA.pm  view on Meta::CPAN

242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
sub name {
    my $self = shift;
    my $ain = shift || die "No AIN given for which to fetch the name";
    return $self->_execute_cmd("getswitchname",$ain);
}
 
=item $ain = $aha->ain($name)
 
This is the inverse method to C<name()>. It takes a symbolic name C<$name> as
argument and returns the AIN. If no such name is registered, an error is
raised.
 
=cut
 
sub ain_by_name {
    my $self = shift;
    my $name = shift;
    my $map = $self->{ain_map};
    return $map->{$name} if $map->{$name};
    $self->_init_ain_map();



( run in 0.502 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )