This file is indexed.

/usr/share/perl5/Padre/PluginBuilder.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
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package Padre::PluginBuilder;

=pod

=head1 NAME

Padre::PluginBuilder - L<Module::Build> subclass for building Padre plug-ins

=head1 DESCRIPTION

This is a L<Module::Build> subclass that can be used in place of L<Module::Build>
for the C<Build.PL> of Padre plug-ins. It adds two new build targets for
the plug-ins:

=head1 ADDITIONAL BUILD TARGETS

=head2 C<plugin>

Generates a F<.par> file that contains all the plug-in code. The name of the file
will be according to the plug-in class name: C<Padre::Plugin::Foo> will result
in F<Foo.par>.

Installing the plug-in (for the current architecture) will be as simple as copying
the generated F<.par> file into the C<plugins> directory of the user's Padre
configuration directory (which defaults to F<~/.padre> on Unix systems).

=cut

use 5.008;
use strict;
use warnings;
use Module::Build   ();
use Padre::Constant ();

our $VERSION = '1.00';
our @ISA     = 'Module::Build';

sub ACTION_plugin {
	my ($self) = @_;

	# Need PAR::Dist
	# Don't make a dependency in the Padre Makefile.PL for this
	if ( not eval { require PAR::Dist; PAR::Dist->VERSION(0.17) } ) {
		$self->log_warn("In order to create .par files, you need to install PAR::Dist first.");
		return ();
	}
	$self->depends_on('build');
	my $module = $self->module_name;
	$module =~ s/^Padre::Plugin:://;
	$module =~ s/::/-/g;

	return PAR::Dist::blib_to_par(
		name    => $self->dist_name,
		version => $self->dist_version,
		dist    => "$module.par",
	);
}

=pod

=head2 C<installplugin>

Generates the plug-in F<.par> file as the C<plugin> target, but also installs it
into the user's Padre plug-ins directory.

=cut

sub ACTION_installplugin {
	my ($self) = @_;

	$self->depends_on('plugin');

	my $module = $self->module_name;
	$module =~ s/^Padre::Plugin:://;
	$module =~ s/::/-/g;
	my $plugin = "$module.par";

	require Padre;
	return $self->copy_if_modified(
		from   => $plugin,
		to_dir => Padre::Constant::PLUGIN_DIR,
	);
}

1;

__END__

=pod

=head1 SEE ALSO

L<Padre>, L<Padre::Config>

L<Module::Build>

L<PAR> for more on the plug-in system.

=head1 COPYRIGHT

Copyright 2008-2013 The Padre development team as listed in Padre.pm.

=head1 LICENSE

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

=cut

# 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.