AHA
view release on metacpan or search on metacpan
585960616263646566676869707172737475767778it 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;
use
LWP::UserAgent;
242243244245246247248249250251252253254255256257258259260261262sub
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 )