diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-05-06 14:26:58 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-05-06 14:43:53 +0200 |
commit | 445c329fcab9d794f937e158e3c50857c1535643 (patch) | |
tree | 97fe950c9e330b3e4c67fcb2eb0e3eb4d883f633 /lib/Hal/Cdroms.pm | |
parent | 69943197c142df344dd3a5d1e3202fabb1173813 (diff) | |
download | perl-Hal-Cdroms-445c329fcab9d794f937e158e3c50857c1535643.tar perl-Hal-Cdroms-445c329fcab9d794f937e158e3c50857c1535643.tar.gz perl-Hal-Cdroms-445c329fcab9d794f937e158e3c50857c1535643.tar.bz2 perl-Hal-Cdroms-445c329fcab9d794f937e158e3c50857c1535643.tar.xz perl-Hal-Cdroms-445c329fcab9d794f937e158e3c50857c1535643.zip |
Make member() private
Diffstat (limited to 'lib/Hal/Cdroms.pm')
-rw-r--r-- | lib/Hal/Cdroms.pm | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/Hal/Cdroms.pm b/lib/Hal/Cdroms.pm index ea13282..2cc0fd7 100644 --- a/lib/Hal/Cdroms.pm +++ b/lib/Hal/Cdroms.pm @@ -93,7 +93,7 @@ sub _is_cdrom { my $device = _get_device($o, $udisks_path); my $drive = _get_drive($o, $device); return if !($drive && _get_property($drive, 'Drive', 'Removable')); - return unless member(_get_property($device, 'Block', 'IdType'), 'iso9660', 'udf'); + return unless _member(_get_property($device, 'Block', 'IdType'), 'iso9660', 'udf'); eval { _get_property($device, 'Filesystem', 'MountPoints') }; } @@ -241,7 +241,7 @@ sub wait_for_mounted { _reactor_wait($o->{dbus}, $o_timeout, sub { my ($msg) = @_; - return unless member($msg->get_member, 'InterfacesAdded', 'PropertiesChanged'); + return unless _member($msg->get_member, 'InterfacesAdded', 'PropertiesChanged'); my $udisks_path = $msg->get_member eq 'InterfacesAdded' ? ($msg->get_args_list)[0] : $msg->get_path; return unless $udisks_path =~ /block_devices/; return unless _is_cdrom($o, $udisks_path); @@ -277,14 +277,8 @@ sub _reactor_wait { $found_val; } -=head2 member(SCALAR, LIST) - -is the value in the list? - -=cut - # From MDK::Common::DataStructure : -sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 } +sub _member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 } =head1 AUTHOR |