This file is indexed.

/usr/share/perl5/Class/DBI/Cascade/Fail.pm is in libclass-dbi-perl 3.0.17-4.

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
package Class::DBI::Cascade::Fail;

=head1 NAME

Class::DBI::Cascade::Fail - Do not cascade if foreign objects exist

=head1 DESCRIPTION

This is a Cascading Delete strategy that will throw an error if any
object about to be deleted still has any other objects pointing at it.

=cut

use strict;
use warnings;

use base 'Class::DBI::Cascade::None';

sub cascade {
	my ($self, $obj) = @_;
	my $refs = $self->foreign_for($obj)->count or return;
	$self->{_rel}->foreign_class->_croak(
		"$refs objects still refer to $obj. Deletion failed");
}

1;