This file is indexed.

/usr/share/perl5/Padre/Plugin/PDL.pm is in libpadre-plugin-pdl-perl 0.05-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
package Padre::Plugin::PDL;

use 5.008;
use strict;
use warnings;
use Padre::Plugin ();

our $VERSION = '0.05';

our @ISA = 'Padre::Plugin';

# Child modules we need to unload when disabled
use constant CHILDREN => qw{
	Padre::Plugin::PDL
	Padre::Plugin::PDL::Document
	Padre::Plugin::PDL::Help
	Padre::Plugin::PDL::Util
};

# Called when Padre wants to check what package versions this
# plugin needs
sub padre_interfaces {
	return
		'Padre::Plugin'         => 0.94,
		'Padre::Document'       => 0.94,
		'Padre::Wx::Main'       => 0.94,
		'Padre::Wx::Role::Main' => 0.94,
		'Padre::Help'           => 0.94,
		;
}

# Called when Padre wants to knows what documents this Plugin supports
sub registered_documents {
	return 'application/x-perl' => 'Padre::Plugin::PDL::Document',;
}

# Called when Padre wants a name for the plugin
sub plugin_name {
	Wx::gettext('PDL');
}

# Called when the plugin is enabled by Padre
sub plugin_enable {
	my $self = shift;

	# Read the plugin configuration, and
	my $config = $self->config_read;
	unless ( defined $config ) {

		# No configuration, let us create it
		$config = {};
	}

	#TODO initialize your configuration here

	# Write the plugin's configuration
	$self->config_write($config);

	# Update configuration attribute
	$self->{config} = $config;

	# Generate missing Padre's events
	# TODO remove once Padre 0.96 is released
	require Padre::Plugin::PDL::Role::NeedsPluginEvent;
	Padre::Plugin::PDL::Role::NeedsPluginEvent->meta->apply( $self->main );

	# Highlight the current editor. This is needed when a plugin is enabled
	# for the first time
	$self->editor_changed;

	return 1;
}

# Called when the plugin is disabled by Padre
sub plugin_disable {
	my $self = shift;

	# TODO: Switch to Padre::Unload once Padre 0.96 is released
	for my $package (CHILDREN) {
		require Padre::Unload;
		Padre::Unload->unload($package);
	}
}

# Called when Padre wants to display plugin menu items
#sub menu_plugins {
#	my $self      = shift;
#	my $main      = $self->main;
#	my $menu_item = Wx::MenuItem->new( undef, -1, Wx::gettext('PDL') );
#
#
#	Wx::Event::EVT_MENU(
#		$main,
#		$menu_item,
#		sub {
#		},
#	);
#
#	return $menu_item;
#}

# Called when an editor is opened
sub editor_enable {
	my $self     = shift;
	my $editor   = shift;
	my $document = shift;

	# Only on Perl documents
	return unless $document->isa('Padre::Document::Perl');

	require Padre::Plugin::PDL::Util;
	Padre::Plugin::PDL::Util::add_pdl_keywords_highlighting( $document, $editor );
}

# Called when an editor is changed
sub editor_changed {
	my $self     = shift;
	my $document = $self->current->document or return;
	my $editor   = $self->current->editor or return;

	# Only on Perl documents
	return unless $document->isa('Padre::Document::Perl');

	require Padre::Plugin::PDL::Util;
	Padre::Plugin::PDL::Util::add_pdl_keywords_highlighting( $document, $editor );
}


1;

__END__

=pod

=head1 NAME

Padre::Plugin::PDL - PDL support for Padre

=head1 SYNOPSIS

    cpan Padre::Plugin::PDL

Then use it via L<Padre>, The Perl IDE.

=head1 DESCRIPTION

Once enabled, one will automatically get the following features:

=over

=item Context-sensitive help integration

Press F2 to get the help for the current PDL keyword

=back

=head1 BUGS

Please report any bugs or feature requests to C<bug-padre-plugin-pdl at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Padre-Plugin-PDL>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Padre::Plugin::PDL

You can also look for information at:

=over 4

=item * RT: CPAN's request tracker

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Padre-Plugin-PDL>

=item * AnnoCPAN: Annotated CPAN documentation

L<http://annocpan.org/dist/Padre-Plugin-PDL>

=item * CPAN Ratings

L<http://cpanratings.perl.org/d/Padre-Plugin-PDL>

=item * Search CPAN

L<http://search.cpan.org/dist/Padre-Plugin-PDL/>

=back

=head1 SEE ALSO

L<PDL>, L<Padre>

=head1 AUTHORS

Ahmad M. Zawawi <ahmad.zawawi@gmail.com>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Ahmad M. Zawawi

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut