Net::Fritz::Data - wraps various response data
my $fritz = Net::Fritz::Box->new();
my $device = $fritz->discover();
my $service = $device->find_service('DeviceInfo:1');
my $response = $service->call('GetSecurityPort');
# $response is Net::Fritz::Data
printf "SSL communication port is %d\n",
my $service_list = $device->find_service_names('DeviceInfo:1');
# service_list is Net::Fritz::Data
printf "%d services found\n",
This class wraps the return data from a Net::Fritz::Service call. This is only done for consistent error checks: Net::Fritz::Data does the role Net::Fritz::IsNoError, so it is possible to check for errors during the service call with $response->error and $response->errorcheck (see Net::Fritz::Error for details).
Apart from that the response data from the service call is passed through unaltered, so you have to know with which data type the services answers.
This wrapper class is also used in some other methods that return things that need to be error-checkable, like find_service_names.
Returns the response data of the service call. For lists and hashes, this will be a reference.
See "error" in Net::Fritz::IsNoError.
Creates a new Net::Fritz::Data object. You propably don't have to call this method, it's mostly used internally. Expects parameters in key => value form with the following keys:
key => value
set the data to hold
With only one parameter (in fact: any odd value of parameters), the first parameter is automatically mapped to data.
Kind of an alias for $response-data>: Returns the data attribute.
Returns some preformatted multiline information about the object. Useful for debugging purposes, printing or logging. The optional parameter indent is used for indentation of the output by prepending it to every line.
See "errorcheck" in Net::Fritz::IsNoError.
See Net::Fritz for general information about this package, especially "INTERFACE" in Net::Fritz for links to the other classes.
Christian Garbs <firstname.lastname@example.org>
Copyright (C) 2017 Christian Garbs
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
To install Net::Fritz, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.