1 package Android
::ADB
::Device
;
7 use parent qw
/Class::Accessor::Fast/;
9 our $VERSION = '0.001';
12 my ($class, $serial, $state, @attrs) = @_;
13 my %attrs = map { split ':', $_, 2 } @attrs;
14 bless { serial
=> $serial, state => $state, %attrs }, $class
17 __PACKAGE__
->mk_ro_accessors(qw
/serial state usb product model device/);
26 Android::ADB::Device - information about an Android device
31 my @devices = $adb->devices;
32 say $devices[0]->serial;
33 say $devices[0]->state; # e.g. offline, bootloader, sideload, or device
35 # The available attributes depend on your device
36 say $devices[0]->usb; # e.g. 2-1
37 say $devices[0]->product; # e.g. angler
38 say $devices[0]->model; # e.g. MI_MAX
39 say $devices[0]->device; # e.g. angler
43 Information about an Android device in form of a blessed hash with a
44 few accessors. See SYNPOSIS for a list of accessors.
52 Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
54 =head1 COPYRIGHT AND LICENSE
56 Copyright (C) 2017 by Marius Gavrilescu
58 This library is free software; you can redistribute it and/or modify
59 it under the same terms as Perl itself, either Perl version 5.24.2 or,
60 at your option, any later version of Perl 5 you may have available.
This page took 0.022518 seconds and 4 git commands to generate.