This file is indexed.

/usr/share/perl5/IO/Event/Event.pm is in libio-event-perl 0.813-1.

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
#
# Use Event for the IO::Event event handler
#

my $debug = $IO::Event::debug;
my $edebug = $IO::Event::edebug;
my $sdebug = $IO::Event::sdebug;

package IO::Event::Event;

require IO::Event;
use strict;
use warnings;

our @ISA = qw(IO::Event::Common);

sub import
{
	require IO::Event;
	IO::Event->import('no_emulate_Event');
}

sub new
{
	my ($pkg, @stuff) = @_;
	require Event;
	require Event::Watcher;
	$pkg->SUPER::new(@stuff);
}

sub loop
{
	require Event;
	Event::loop(@_);
}

sub unloop_all
{
	require Event;
	Event::unloop_all(@_);
}

sub timer
{
	require Event;
	shift;
	Event->timer(hard => 1, @_);
}

sub idle
{
	require Event;
	shift;
	Event->idle(@_);
}

sub set_write_polling
{
	my ($self, $new) = @_;
	my $event = ${*$self}{ie_event};
	if ($new) {
		$event->poll($event->poll | Event::Watcher::W());
	} else {
		$event->poll($event->poll & ~Event::Watcher::W());
	}
}

sub set_read_polling
{
	my ($self, $new) = @_;
	my $event = ${*$self}{ie_event};
	if ($new) {
		$event->poll($event->poll | Event::Watcher::R());
	} else {
		if ($event) {
			$event->poll($event->poll & ~Event::Watcher::R());
		}
	}
}

sub ie_register
{
	my ($self) = @_;
	my ($fh, $fileno) = $self->SUPER::ie_register();
	my $R = ${*$self}{ie_readclosed}
		? 0
		: Event::Watcher::R();
	${*$self}{ie_want_read_events} = ! ${*$self}{ie_readclosed};
	${*$self}{ie_want_write_events} = '';
	${*$self}{ie_event} = Event->io(
		fd	=> $fileno,
		poll	=> Event::Watcher::E()|Event::Watcher::T()|$R,
		cb	=> [ $self, 'ie_dispatch' ],
		desc	=> ${*$self}{ie_desc},
		edebug	=> $edebug,
	);
	print STDERR "registered ${*$self}{ie_fileno}:${*$self}{ie_desc} $self $fh ${*$self}{ie_event}\n"
		if $debug;
}

sub ie_deregister
{
	my ($self) = @_;
	$self->SUPER::ie_deregister();
	${*$self}{ie_event}->cancel
		if ${*$self}{ie_event};
	delete ${*$self}{ie_event};
}

1;