This file is indexed.

/usr/lib/perl5/Prima/StdDlg.pm is in libprima-perl 1.28-1.2.

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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
#
#  Copyright (c) 1997-2002 The Protein Laboratory, University of Copenhagen
#  All rights reserved.
#
#  Redistribution and use in source and binary forms, with or without
#  modification, are permitted provided that the following conditions
#  are met:
#  1. Redistributions of source code must retain the above copyright
#     notice, this list of conditions and the following disclaimer.
#  2. Redistributions in binary form must reproduce the above copyright
#     notice, this list of conditions and the following disclaimer in the
#     documentation and/or other materials provided with the distribution.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
#  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
#  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
#  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
#  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
#  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
#  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
#  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
#  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
#  SUCH DAMAGE.
#
#  Created by:
#     Anton Berezin  <tobez@tobez.org>
#     Dmitry Karasik <dk@plab.ku.dk> 
#
#  $Id: StdDlg.pm,v 1.28 2007/09/13 15:12:25 dk Exp $



# Contains stubs for load-on-demand of the following modules:
#   Prima::OpenDialog       => Prima/FileDialog.pm
#   Prima::SaveDialog       => Prima/FileDialog.pm
#   Prima::ChDirDialog      => Prima/FileDialog.pm
#   Prima::FontDialog       => Prima/FontDialog.pm
#   Prima::FindDialog       => Prima/EditDialog.pm
#   Prima::ReplaceDialog    => Prima/EditDialog.pm
#   Prima::PrintSetupDialog => Prima/PrintDialog.pm
#   Prima::ColorDialog      => Prima/ColorDialog.pm
#   Prima::ImageOpenDialog  => Prima/ImageDialog.pm
#   Prima::ImageSaveDialog  => Prima/ImageDialog.pm

no strict;

package Prima::ColorDialog;

sub AUTOLOAD
{
	my ($method) = $Prima::ColorDialog::AUTOLOAD =~ /::([^:]+)$/;
	delete ${Prima::ColorDialog::}{AUTOLOAD};
	eval "use Prima::ColorDialog"; die "$@\n" if $@;
	shift-> $method(@_);
}

package Prima::FontDialog;

sub AUTOLOAD
{
	my ($method) = $Prima::FontDialog::AUTOLOAD =~ /::([^:]+)$/;
	delete ${Prima::FontDialog::}{AUTOLOAD};
	eval "use Prima::FontDialog"; die "$@\n" if $@;
	shift-> $method(@_);
}


package Prima::OpenDialog;

sub AUTOLOAD
{
	my ($method) = $Prima::OpenDialog::AUTOLOAD =~ /::([^:]+)$/;
	delete ${Prima::OpenDialog::}{AUTOLOAD};
	delete ${Prima::SaveDialog::}{AUTOLOAD};
	delete ${Prima::ChDirDialog::}{AUTOLOAD};
	eval "use Prima::FileDialog"; die "$@\n" if $@;
	shift-> $method(@_);
}

package Prima::SaveDialog;

sub AUTOLOAD
{
	my ($method) = $Prima::SaveDialog::AUTOLOAD =~ /::([^:]+)$/;
	delete ${Prima::OpenDialog::}{AUTOLOAD};
	delete ${Prima::SaveDialog::}{AUTOLOAD};
	delete ${Prima::ChDirDialog::}{AUTOLOAD};
	eval "use Prima::FileDialog"; die "$@\n" if $@;
	shift-> $method(@_);
}

package Prima;

my ($openFileDlg, $saveFileDlg);
	
my @fileDlgProps = qw( defaultExt fileName filter filterIndex
directory createPrompt multiSelect noReadOnly noTestFileCreate overwritePrompt
pathMustExist fileMustExist sorted showDotFiles);

sub open_file
{
	my %profile = @_;
	$openFileDlg = Prima::OpenDialog-> create( 
		system => exists($profile{system}) ? $profile{system} : 1,
		onDestroy => sub { undef $openFileDlg},
	) unless $openFileDlg;
	delete $profile{system};
	my %a = %{$openFileDlg-> profile_default};
	$openFileDlg-> set(( map { $_ => $a{$_}} @fileDlgProps), %profile);
	return $openFileDlg-> execute;
}

sub save_file
{
	my %profile = @_;
	$saveFileDlg = Prima::SaveDialog-> create( 
		system => exists($profile{system}) ? $profile{system} : 1,
		onDestroy => sub { undef $saveFileDlg},
	) unless $saveFileDlg;
	delete $profile{system};
	my %a = %{$saveFileDlg-> profile_default};
	$saveFileDlg-> set(( map { $_ => $a{$_}} @fileDlgProps), %profile);
	return $saveFileDlg-> execute;
}

package Prima::ChDirDialog;

sub AUTOLOAD
{
	my ($method) = $Prima::ChDirDialog::AUTOLOAD =~ /::([^:]+)$/;
	delete ${Prima::OpenDialog::}{AUTOLOAD};
	delete ${Prima::SaveDialog::}{AUTOLOAD};
	delete ${Prima::ChDirDialog::}{AUTOLOAD};
	eval "use Prima::FileDialog"; die "$@\n" if $@;
	shift-> $method(@_);
}

package mb;

use constant ChangeAll => 0xCA11;

package Prima::FindDialog;

sub AUTOLOAD
{
	my ($method) = $Prima::FindDialog::AUTOLOAD =~ /::([^:]+)$/;
	delete ${Prima::FindDialog::}{AUTOLOAD};
	delete ${Prima::ReplaceDialog::}{AUTOLOAD};
	eval "use Prima::EditDialog"; die "$@\n" if $@;
	shift-> $method(@_);
}

package Prima::ReplaceDialog;

sub AUTOLOAD
{
	my ($method) = $Prima::ReplaceDialog::AUTOLOAD =~ /::([^:]+)$/;
	delete ${Prima::FindDialog::}{AUTOLOAD};
	delete ${Prima::ReplaceDialog::}{AUTOLOAD};
	eval "use Prima::EditDialog"; die "$@\n" if $@;
	shift-> $method(@_);
}

package Prima::PrintSetupDialog;

sub AUTOLOAD
{
	my ($method) = $Prima::PrintSetupDialog::AUTOLOAD =~ /::([^:]+)$/;
	delete ${Prima::PrintSetupDialog::}{AUTOLOAD};
	eval "use Prima::PrintDialog"; die "$@\n" if $@;
	shift-> $method(@_);
}

package Prima::ImageOpenDialog;

sub AUTOLOAD
{
	my ($method) = $Prima::ImageOpenDialog::AUTOLOAD =~ /::([^:]+)$/;
	delete ${Prima::ImageOpenDialog::}{AUTOLOAD};
	delete ${Prima::ImageSaveDialog::}{AUTOLOAD};
	eval "use Prima::ImageDialog"; die "$@\n" if $@;
	shift-> $method(@_);
}

package Prima::ImageSaveDialog;

sub AUTOLOAD
{
	my ($method) = $Prima::ImageSaveDialog::AUTOLOAD =~ /::([^:]+)$/;
	delete ${Prima::ImageOpenDialog::}{AUTOLOAD};
	delete ${Prima::ImageSaveDialog::}{AUTOLOAD};
	eval "use Prima::ImageDialog"; die "$@\n" if $@;
	shift-> $method(@_);
}

1;

__DATA__

=pod

=head1 NAME

Prima::StdDlg - wrapper module to the toolkit standard dialogs

=head1 DESCRIPTION

Provides a unified access to the toolkit dialogs, so there is
no need to C<use> the corresponding module explicitly.

=head1 SYNOPSIS

	use Prima::StdDlg;

	Prima::FileDialog-> create-> execute;
	Prima::FontDialog-> create-> execute;

	# open standard file open dialog
	my $file = Prima::open_file;
	print "You've selected: $file\n" if defined $file;

=head1 API

The module accesses the following dialog classes:

=over

=item Prima::open_file 

Invokes standard file open dialog and return the selected file(s).
Uses system-specific standard file open dialog, if available.

=item Prima::save_file 

Invokes standard file save dialog and return the selected file(s).
Uses system-specific standard file save dialog, if available.

=item Prima::OpenDialog

File open dialog.

See L<Prima::FileDialog/Prima::OpenDialog>

=item  Prima::SaveDialog

File save dialog.

See L<Prima::FileDialog/Prima::SaveDialog>

=item Prima::ChDirDialog

Directory change dialog.

See L<Prima::FileDialog/Prima::ChDirDialog>

=item Prima::FontDialog

Font selection dialog.

See L<Prima::FontDialog>. 

=item Prima::FindDialog

Generic 'find text' dialog.

See L<Prima::EditDialog>.

=item Prima::ReplaceDialog

Generic 'find and replace text' dialog.

See L<Prima::EditDialog>.

=item Prima::PrintSetupDialog

Printer selection and setup dialog.

See L<Prima::PrintDialog>.

=item Prima::ColorDialog

Color selection dialog.

See L<Prima::ColorDialog/Prima::ColorDialog>.

=item Prima::ImageOpenDialog

Image file load dialog.

See L<Prima::ImageDialog/Prima::ImageOpenDialog>.

=item Prima::ImageSaveDialog

Image file save dialog.

See L<Prima::ImageDialog/Prima::ImageSaveDialog>.

=back

=head1 AUTHORS

Anton Berezin E<lt>tobez@plab.ku.dkE<gt>,
Dmitry Karasik, E<lt>dmitry@karasik.eu.orgE<gt>.

=head1 SEE ALSO

L<Prima>, L<Prima::Classes>


=cut