This file is indexed.

/usr/lib/perl5/Audio/XMMSClient.pm is in libaudio-xmmsclient-perl 0.8+dfsg-9.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
package Audio::XMMSClient;

use strict;
use warnings;
use Carp;
use IO::Handle;
use IO::Select;
use Audio::XMMSClient::Collection;

our $VERSION = '0.04';
our @ISA;

eval {
    require XSLoader;
    XSLoader::load(__PACKAGE__, $VERSION);
    1;
} or do {
    require DynaLoader;
    push @ISA, 'DynaLoader';
    bootstrap Audio::XMMSClient $VERSION;
};

sub loop {
    my ($self) = @_;

    my $fd = IO::Handle->new_from_fd( $self->io_fd_get, 'r+' );
    $self->{do_loop} = 1;

    pipe my $r, my $w;
    $self->{wakeup} = $w;

    my $rin = IO::Select->new( $fd, $r );
    my $ein = IO::Select->new( $fd     );
    my $win;

    while ($self->{do_loop}) {

        if ($self->io_want_out) {
            $win = IO::Select->new( $fd );
        }
        else {
            $win = undef;
        }

        my ($i, $o, $e) = IO::Select->select( $rin, $win, $ein );

        if (ref $i && @$i && $i->[0] == $fd) {
            $self->io_in_handle;
        }

        if (ref $o && @$o && $o->[0] == $fd) {
            $self->io_out_handle;
        }

        if (ref $e && @$e && $e->[0] == $fd) {
            $self->disconnect;
            $self->{do_loop} = 0;
        }
    }
}

sub quit_loop {
    my ($self) = @_;

    $self->{do_loop} = 0;
    $self->{wakeup}->print('42');
}

sub request {
    my $self = shift;
    my $func = shift;

    my $callback  = pop;

    if (!$self->can($func)) {
        Carp::croak( "Invalid request name `${func}' given" );
    }

    my $result = $self->$func( @_ );
    $result->notifier_set($callback);

    return $result;
}

1;

=pod

=head1 NAME

Audio::XMMSClient - Interface to the xmms2 music player

=head1 SYNOPSIS

  use Audio::XMMSClient;

  $c = Audio::XMMSClient->new( $name );
  $c->connect;

  my $r = $c->playback_status;
  $r->wait;
  print $r->value;

=head1 DESCRIPTION

This module provides a perl interface to the xmms2 client library. It currently
lacks a good documentation, but the 'turorial' directory provides some nice and
well explained examples to get you started for now.

=head1 AUTHOR

Florian Ragwitz <rafl@debian.org>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2006-2008, Florian Ragwitz

This library is free software; you can redistribute it and/or modify it under
the same terms as Perl itself, either Perl version 5.8.8 or, at your option,
any later version of Perl 5 you may have available.

=cut