This file is indexed.

/usr/share/perl5/Padre/Breakpoints.pm is in padre 1.00+dfsg-3.

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
package Padre::Breakpoints;

#ToDo Q is this package wrong in the wronge location

use 5.010;
use strict;
use warnings;

our $VERSION = '1.00';

#######
# function set_breakpoints_clicked
# this is a toggle function based on current status
#######
sub set_breakpoints_clicked {
	my $bp_line = $_[1];

	my $debug_breakpoints = ('Padre::DB::DebugBreakpoints');

	my $editor       = Padre::Current->editor;
	my $current_file = $editor->{Document}->filename;
	$bp_line      = $editor->GetCurrentLine unless defined $bp_line;
	$bp_line++;
	my %bp_action;
	$bp_action{line} = $bp_line;

	if ( $#{ $debug_breakpoints->select( "WHERE filename = ? AND line_number = ?", $current_file, $bp_line ) } >= 0 ) {

		# say 'delete me';
		$editor->MarkerDelete( $bp_line - 1, Padre::Constant::MARKER_BREAKPOINT() );
		$editor->MarkerDelete( $bp_line - 1, Padre::Constant::MARKER_NOT_BREAKABLE() );
		$debug_breakpoints->delete_where( "filename = ? AND line_number = ?", $current_file, $bp_line );
		$bp_action{action} = 'delete';
	} else {

		# say 'create me';
		$editor->MarkerAdd( $bp_line - 1, Padre::Constant::MARKER_BREAKPOINT() );
		$debug_breakpoints->create(
			filename    => $current_file,
			line_number => $bp_line,
			active      => 1,
			last_used   => time(),
		);
		$bp_action{action} = 'add';
	}
	#update the breakpoint panel
        if ( $editor->main->{breakpoints} ) {
			# say 'set_breakpoint_clicked -> on_refresh_clicked 1';
			$editor->main->{breakpoints}->on_refresh_click();
        }
	#update the debugger client - if we're currently debugging
        if ( $editor->main->{debugger} ) {
			# say 'set_breakpoint_clicked -> on_refresh_clicked 2';
            $editor->main->{debugger}->update_debugger_breakpoint(\%bp_action);
        }

	return \%bp_action;
}

#######
# function show_breakpoints
# to be called when showing current file
#######
sub show_breakpoints {

	my $editor            = Padre::Current->editor;
	my $debug_breakpoints = ('Padre::DB::DebugBreakpoints');
	my $current_file      = $editor->{Document}->filename;
	my $sql_select        = "WHERE filename = ? ORDER BY line_number ASC";
	my @tuples            = eval { $debug_breakpoints->select( $sql_select, $current_file ); };
	if ($@) {
		return;
	}

	for ( 0 .. $#tuples ) {
		if ( $tuples[$_][3] == 1 ) {
			$editor->MarkerAdd( $tuples[$_][2] - 1, Padre::Constant::MARKER_BREAKPOINT() );
		} else {
			$editor->MarkerAdd( $tuples[$_][2] - 1, Padre::Constant::MARKER_NOT_BREAKABLE() );
		}
	}

	return;
}


1;

# Copyright 2008-2013 The Padre development team as listed in Padre.pm.
# LICENSE
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl 5 itself.