diff options
-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 |